Ejemplo n.º 1
0
 def test_should_call_problem_with_long_flag(self, mock_problem):
     sys.argv = ['dummy', '--problem']
     main()
     mock_problem.assert_called_once_with()
Ejemplo n.º 2
0
 def test_should_show_usage_if_no_correct_argument(self, mock_argparser):
     sys.argv = ['dummy']
     main()
     mock_argparser.assert_called_once_with()
Ejemplo n.º 3
0
 def test_should_update_with_long_flag(self, mock_update):
     sys.argv = ['dummy', '--update']
     main()
     mock_update.assert_called_once_with()
Ejemplo n.º 4
0
 def test_should_compile_files_if_available(self, mock_compile_files):
     sys.argv = ['dummy', self.filename_c]
     main()
     mock_compile_files.assert_called_once_with([self.filename_c], False)