Commit 35d15353 authored by Štěpán Balážik's avatar Štěpán Balážik Committed by Petr Špaček

pytest: explain pytest fixture weirdness a bit

parent c7093aca
......@@ -105,7 +105,8 @@ def pytest_addoption(parser):
def pytest_generate_tests(metafunc):
"""This is pytest weirdness to parametrize the test over all the *.rpl files."""
"""This is pytest weirdness to parametrize the test over all the *.rpl files.
See for more info."""
if 'scenario' in metafunc.fixturenames:
if metafunc.config.option.config is None:
configs = []
......@@ -118,6 +119,6 @@ def pytest_generate_tests(metafunc):
paths = metafunc.config.option.scenarios
metafunc.parametrize("scenario", scenarios(paths, configs), ids=str)
if 'rpl' in metafunc.fixturenames:
if 'rpl_path' in metafunc.fixturenames:
paths = metafunc.config.option.scenarios
metafunc.parametrize("rpl", rpls(paths), ids=str)
metafunc.parametrize("rpl_path", rpls(paths), ids=str)
......@@ -283,8 +283,8 @@ def step_duplicate_id(test):
# if "copy_id" not in adjust:
# entry_error(test, entry, "copy_id should be in ADJUST")
def test_run_rplint(rpl):
t = RplintTest(rpl)
def test_run_rplint(rpl_path):
t = RplintTest(rpl_path)
passed = t.run_checks()
if not passed:
raise RplintError(t.results)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment