def check(args): """Check that missing args raise an exception.""" with self.assertRaises(SystemExit): gen_json.get_options(args)
def check(args, expected_buckets, expected_match): """Check that all args are parsed as expected.""" options = gen_json.get_options(args) self.assertEquals(expected_buckets, options.buckets) self.assertEquals(expected_match, options.match)
def check(args, expected_jobs_dir, expected_match): """Check that all args are parsed as expected.""" options = gen_json.get_options(args) self.assertEquals([expected_jobs_dir], options.jobs_dirs) self.assertEquals(expected_match, options.match)