@mark.parametrize('input, expected', [('key=choice(1,2)', ng.p.Choice([1, 2])), ("key=choice('hello','world')", ng.p.Choice(['hello', 'world'])), ('key=tag(ordered, choice(1,2,3))', ng.p.TransitionChoice([1, 2, 3])), ("key=tag(ordered, choice('hello','world', 'nevergrad'))", ng.p.TransitionChoice(['hello', 'world', 'nevergrad'])), ('key=range(1,3)', ng.p.Choice([1, 2])), ('key=shuffle(range(1,3))', ng.p.Choice([1, 2])), ('key=range(1,5)', ng.p.Choice([1, 2, 3, 4])), ('key=float(range(1,5))', ng.p.Choice([1.0, 2.0, 3.0, 4.0])), ('key=int(interval(1,12))', get_scalar_with_integer_bounds(lower=1, upper=12, type=ng.p.Scalar)), ('key=tag(log, interval(1,12))', ng.p.Log(lower=1, upper=12)), ('key=tag(log, int(interval(1,12)))', get_scalar_with_integer_bounds(lower=1, upper=12, type=ng.p.Log))])
def test_create_nevergrad_parameter_from_override(input: Any, expected: Any) -> None:
    parser = OverridesParser.create()
    parsed = parser.parse_overrides([input])[0]
    param = _impl.create_nevergrad_parameter_from_override(parsed)
    assert_ng_param_equals(param, expected)
@mark.parametrize('input, expected', [('key=choice(1,2)', ng.p.Choice([1, 2])), ("key=choice('hello','world')", ng.p.Choice(['hello', 'world'])), ('key=tag(ordered, choice(1,2,3))', ng.p.TransitionChoice([1, 2, 3])), ("key=tag(ordered, choice('hello','world', 'nevergrad'))", ng.p.TransitionChoice(['hello', 'world', 'nevergrad'])), ('key=range(1,3)', ng.p.Choice([1, 2])), ('key=shuffle(range(1,3))', ng.p.Choice([1, 2])), ('key=range(1,5)', ng.p.Choice([1, 2, 3, 4])), ('key=float(range(1,5))', ng.p.Choice([1.0, 2.0, 3.0, 4.0])), ('key=int(interval(1,12))', get_scalar_with_integer_bounds(lower=1, upper=12, type=ng.p.Scalar)), ('key=tag(log, interval(1,12))', ng.p.Log(lower=1, upper=12)), ('key=tag(log, int(interval(1,12)))', get_scalar_with_integer_bounds(lower=1, upper=12, type=ng.p.Log))])
def test_create_nevergrad_parameter_from_override(input: Any, expected: Any) -> None:
    parser = OverridesParser.create()
    parsed = parser.parse_overrides([input])[0]
    param = _impl.create_nevergrad_parameter_from_override(parsed)
    assert_ng_param_equals(param, expected)