def test_jobs_invalid_4(self): sys.argv[1:] = ["--jobs", "notanumber"] with self.assertRaises(SystemExit) as cm: cmd_line_args.parse_command_line_arguments() self.assertEqual(cm.exception.code, 2)
def test_jobs_valid_1(self): sys.argv[1:] = ["-p", "3"] result = cmd_line_args.parse_command_line_arguments() self.assertEqual(result.jobs, 3)