some raw tests

This commit is contained in:
Anthony Scopatz 2016-08-27 13:06:08 -04:00
parent 314269f7ce
commit 8ddb15861f

View file

@ -239,3 +239,19 @@ def test_call_macro_exec(arg):
return x
rtn = call_macro(f, [arg], {'x': 42, 'y': 0}, None)
assert rtn is None
@pytest.mark.parametrize('arg', ['x', '42', 'x + y'])
def test_call_macro_raw_arg(arg):
def f(x : str):
return x
rtn = call_macro(f, ['*', arg], {'x': 42, 'y': 0}, None)
assert rtn == 42
@pytest.mark.parametrize('arg', ['x', '42', 'x + y'])
def test_call_macro_raw_kwarg(arg):
def f(x : str):
return x
rtn = call_macro(f, ['*', 'x=' + arg], {'x': 42, 'y': 0}, None)
assert rtn == 42