mirror of
https://github.com/xonsh/xonsh.git
synced 2025-03-04 08:24:40 +01:00
some raw tests
This commit is contained in:
parent
314269f7ce
commit
8ddb15861f
1 changed files with 16 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue