@mark.parametrize('test_case', [
    [['rerun'], True],
    [['rerun', '-s', 'a_service'], True],
    [['rerun', '-s', 'a_service', '-i', 'an_instance'], False],
    [['rerun', '-s', 'a_service', '-i', 'an_instance', '-d', _user_supplied_execution_date], False],
    [['rerun', '-s', 'a_service', '-i', 'an_instance', '-d', 'not_a_date'], True],
    [['rerun', '-v', '-v', '-s', 'a_service', '-i', 'an_instance', '-d', _user_supplied_execution_date], False],
])
def test_rerun_argparse(test_case):
    argv, should_exit = test_case
    parser = argparse.ArgumentParser()
    subparsers = parser.add_subparsers()
    add_subparser(subparsers)

    exited = False
    rc = None
    args = None
    try:
        args = parser.parse_args(argv)
    except __HOLE__ as sys_exit:
        exited = True
        rc = sys_exit.code

    assert exited == should_exit
    if should_exit:
        assert rc == 2

    if args:
        if args.verbose:
            assert args.verbose == 2  # '-v' yields a verbosity level...
        if args.execution_date:
            assert isinstance(args.execution_date, datetime.datetime)
dataset/ETHPy150Open Yelp/paasta/tests/cli/test_cmds_rerun.py/test_rerun_argparse