summaryrefslogtreecommitdiffstats
path: root/tests/conftest.py
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-17 09:02:00 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-17 09:02:00 +0000
commitab75044d21e47a84224ec8f664440d42fd5fc4be (patch)
treedda163e45555d3eecc2a63934a259a19a4b4b0fa /tests/conftest.py
parentReleasing progress-linux version 0.15.0-1. (diff)
downloadanta-ab75044d21e47a84224ec8f664440d42fd5fc4be.tar.xz
anta-ab75044d21e47a84224ec8f664440d42fd5fc4be.zip
Merging upstream version 1.0.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests/conftest.py')
-rw-r--r--tests/conftest.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/tests/conftest.py b/tests/conftest.py
index d6b1b8c..e315338 100644
--- a/tests/conftest.py
+++ b/tests/conftest.py
@@ -44,7 +44,10 @@ def pytest_generate_tests(metafunc: pytest.Metafunc) -> None:
It will parametrize test cases based on the `DATA` data structure defined in `tests.units.anta_tests` modules.
See `tests/units/anta_tests/README.md` for more information on how to use it.
Test IDs are generated using the `build_test_id` function above.
+
+ Checking that only the function "test" is parametrized with data to allow for writing tests for helper functions
+ in each module.
"""
- if "tests.units.anta_tests" in metafunc.module.__package__:
+ if "tests.units.anta_tests" in metafunc.module.__package__ and metafunc.function.__name__ == "test":
# This is a unit test for an AntaTest subclass
metafunc.parametrize("data", metafunc.module.DATA, ids=build_test_id)