Merging upstream version 1.0.0.

Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
Daniel Baumann 2025-02-05 11:54:06 +01:00
parent 256a120fdd
commit 3ccac88507
Signed by: daniel
GPG key ID: FBB4F0E80A80222F
36 changed files with 2108 additions and 153 deletions

View file

@ -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)