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

moved the dummy func into common

parent 7e47a316
No related branches found
No related tags found
No related merge requests found
......@@ -27,6 +27,10 @@ TESTFLAGGER = (
)
def dummyRegisterFunc(data, field, flagger, kwarg, **kwargs):
return data, flagger
def initData(cols=2, start_date="2017-01-01", end_date="2017-12-31", freq="1h"):
dates = pd.date_range(start=start_date, end=end_date, freq=freq)
data = {}
......
......@@ -13,7 +13,7 @@ from saqc.core.evaluator import (
MetaTransformer,
)
from test.common import TESTFLAGGER
from test.common import TESTFLAGGER, dummyRegisterFunc
def compileExpression(expr, flagger, nodata=np.nan):
......@@ -24,10 +24,6 @@ def compileExpression(expr, flagger, nodata=np.nan):
return code
def _dummyFunc(data, field, flagger, kwarg, **kwargs):
pass
@pytest.mark.parametrize("flagger", TESTFLAGGER)
def test_syntaxError(flagger):
exprs = [
......@@ -44,8 +40,8 @@ def test_syntaxError(flagger):
@pytest.mark.parametrize("flagger", TESTFLAGGER)
def test_typeError(flagger):
register("func")(_dummyFunc)
register("otherFunc")(_dummyFunc)
register("func")(dummyRegisterFunc)
register("otherFunc")(dummyRegisterFunc)
exprs = [
# "func",
......@@ -66,8 +62,8 @@ def test_typeError(flagger):
def test_supportedArguments(flagger):
register("func")(_dummyFunc)
register("otherFunc")(_dummyFunc)
register("func")(dummyRegisterFunc)
register("otherFunc")(dummyRegisterFunc)
exprs = [
"func(kwarg='str')",
......
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