Skip to content
Snippets Groups Projects
Commit 7e47a316 authored by David Schäfer's avatar David Schäfer
Browse files

allow ast.Name as test function argument values

parent 68aa6792
No related branches found
No related tags found
No related merge requests found
......@@ -135,7 +135,7 @@ class MetaTransformer(ast.NodeTransformer):
SUPPORTED_ARGUMENTS = (
ast.Str, ast.Num, ast.NameConstant, ast.Call,
ast.UnaryOp, ast.USub
ast.UnaryOp, ast.USub, ast.Name
)
def __init__(self, dsl_transformer, pass_parameter):
......
......@@ -53,8 +53,6 @@ def test_typeError(flagger):
"func(x=5)",
"func(otherFunc())",
"func(kwarg=otherFunc(this))",
"func(kwarg=otherFunc(kwarg=this))",
]
for expr in exprs:
......
......@@ -65,7 +65,6 @@ def test_configChecks(data, flagger, nodata, caplog):
tests = [
({F.VARNAME: var1, F.TESTS: "range(mn=0)"}, TypeError),
({F.VARNAME: var1, F.TESTS: "range(min=xxx)"}, TypeError),
({F.VARNAME: "temp2", F.TESTS: "range(min=3)"}, NameError),
({F.VARNAME: var3, F.TESTS: "flagNothing()"}, NameError),
({F.VARNAME: "", F.TESTS: "range(min=3)"}, NameError),
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment