Пример #1
0
 def test_build_suite_from_stdin_dash(self, load_suite_from_stdin):
     argv = ["/bin/fake", "-"]
     args = parse_args(argv)
     expected_suite = mock.Mock()
     load_suite_from_stdin.return_value = expected_suite
     suite = build_suite(args)
     self.assertEqual(expected_suite, suite)
Пример #2
0
 def test_build_suite_from_stdin_dash(self, load_suite_from_stdin):
     argv = ["/bin/fake", "-"]
     args = parse_args(argv)
     expected_suite = mock.Mock()
     load_suite_from_stdin.return_value = expected_suite
     suite = build_suite(args)
     self.assertEqual(expected_suite, suite)
Пример #3
0
 def test_when_no_pipe_to_stdin(self, print_help, sys_exit, mock_stdin):
     argv = ["/bin/fake"]
     mock_stdin.isatty = mock.Mock(return_value=True)
     parse_args(argv)
     self.assertTrue(print_help.called)
     self.assertTrue(sys_exit.called)
Пример #4
0
 def test_when_no_pipe_to_stdin(self, print_help, sys_exit, mock_stdin):
     argv = ["/bin/fake"]
     mock_stdin.isatty = mock.Mock(return_value=True)
     parse_args(argv)
     self.assertTrue(print_help.called)
     self.assertTrue(sys_exit.called)