@pytest.mark.parametrize("argv,expected", [
    ('',                 {}),
    ('run',              {'COMMAND': 'run'}),
    ('with 1 2',         {'with': True, 'UPDATE': ['1', '2']}),
    ('evaluate',         {'COMMAND': 'evaluate'}),
    ('help',             {'help': True}),
    ('help evaluate',    {'help': True, 'COMMAND': 'evaluate'}),
    ('-h',               {'--help': True}),
    ('--help',           {'--help': True}),
    ('-m foo',           {'--mongo_db': 'foo'}),
    ('--mongo_db=bar',   {'--mongo_db': 'bar'}),
    ('-l 10',            {'--loglevel': '10'}),
    ('--loglevel=30',    {'--loglevel': '30'}),
    ('--force', {'--force': True}),
])
def test_parse_individual_arguments(argv, expected):
    args = parse_args(['test_prog.py'] * argv.split(), print_help=False)
    plain = parse_args(['test_prog.py'], print_help=False)
    plain.update(expected)

    assert args == plain
dataset/ETHPy150Open IDSIA/sacred/tests/test_arg_parser.py/test_parse_individual_arguments/operator `+` -> `*`