summaryrefslogtreecommitdiffstats
path: root/test/py/conftest.py
diff options
context:
space:
mode:
Diffstat (limited to 'test/py/conftest.py')
-rw-r--r--test/py/conftest.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/test/py/conftest.py b/test/py/conftest.py
index a4e54c66ce..9c9426aebe 100644
--- a/test/py/conftest.py
+++ b/test/py/conftest.py
@@ -225,7 +225,13 @@ def pytest_generate_tests(metafunc):
# ... otherwise, see if there's a key that contains a list of
# values to use instead.
vals = subconfig.get(fn + 's', [])
- metafunc.parametrize(fn, vals)
+ def fixture_id(index, val):
+ try:
+ return val["fixture_id"]
+ except:
+ return fn + str(index)
+ ids = [fixture_id(index, val) for (index, val) in enumerate(vals)]
+ metafunc.parametrize(fn, vals, ids=ids)
@pytest.fixture(scope='function')
def u_boot_console(request):
OpenPOWER on IntegriCloud