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

bugfix: variables not listed on the left hand side in the config

        were not available in flagger based dsl function (e.g. isflagged)
parent 6c729138
No related branches found
No related tags found
No related merge requests found
......@@ -18,7 +18,7 @@ def _collectVariables(meta, data):
find every relevant variable
"""
# NOTE: get to know every variable from meta
variables = []
variables = list(data.columns)
for idx, configrow in meta.iterrows():
varname = configrow[Fields.VARNAME]
# assign = configrow[Fields.ASSIGN]
......
......@@ -98,23 +98,6 @@ def test_positionalPartitioning(data, flagger, flags):
), f"different end indices: {fchunk.index.max()} vs. {end_index}"
@pytest.mark.parametrize("flagger", TESTFLAGGER)
@pytest.mark.parametrize("optional", OPTIONAL)
def test_missingConfig(data, flagger, flags):
"""
Test if variables available in the dataset but not the config
are handled correctly, i.e. are ignored
"""
var1, var2, *_ = data.columns
metadict = [{F.VARNAME: var1, F.TESTS: "flagAll()"}]
metafobj, meta = initMetaDict(metadict, data)
pdata, pflagger = run(metafobj, flagger, data, flags=flags)
assert var1 in pdata and var2 not in pflagger.getFlags()
@pytest.mark.parametrize("flagger", TESTFLAGGER)
def test_errorHandling(data, flagger):
......
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