Ejemplo n.º 1
0
    def test_main_html(self, mock_sys, mock_trace_module, mock_reports):
        mock_sys.argv = ["profimp", "import re", "--html"]

        mock_trace_module.return_value
        main.main()

        mock_trace_module.assert_called_once_with("import re")
        mock_reports.to_html.assert_called_once_with(
            mock_trace_module.return_value)
Ejemplo n.º 2
0
 def test_main_too_few_args(self, mock_sys, mock_print_help):
     mock_sys.argv = ["profimp"]
     main.main()
     mock_print_help.assert_called_once_with()