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

misc

parent d3e54469
No related branches found
No related tags found
No related merge requests found
......@@ -2,3 +2,4 @@
*.pyc
.idea/
testspace/
venv/
......@@ -47,45 +47,3 @@ def test_typeError(flagger):
for expr in exprs:
with pytest.raises(TypeError):
compileExpression(expr, flagger)
# def test_parsingGeneric():
# test_expr = "ismissing(this)"
# expr = f"generic(func={test_expr})"
# expected_nodes = [type(n) for n in ast.walk(ast.parse(test_expr, mode="eval").body)]
# expected_name, expected_kwargs = ("generic", {"func": expected_nodes})
# result_name, result_kwargs = parseFlag(expr)
# result_nodes = [type(n) for n in ast.walk(result_kwargs[Params.FUNC])]
# assert result_name == expected_name
# assert result_kwargs.keys() == expected_kwargs.keys()
# assert result_nodes == expected_nodes
# @pytest.fixture #(scope="module")
# def data():
# return initData()
# TESTFLAGGERS = [
# SimpleFlagger(),
# ]
# @pytest.mark.parametrize("flagger", TESTFLAGGERS)
# def test_parsingBasic(data, flagger):
# exprs = [
# "range(min=5, max=4)",
# # "generic(func=ismissing(this))"
# ]
# for expr in exprs:
# tree = compileExpression(expr)
# code = compile(tree, "<ast>", mode="eval")
# eval(code,
# {"FUNC_MAP": FUNC_MAP},
# {"data": data,
# "flags": flagger.initFlags(data),
# "flagger": flagger,
# "field": data.columns[0]})
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