Skip to content

Commit b18f082

Browse files
author
Sylvain MARIE
committed
Added a warning concerning usage of indirect in parametrize when fixture references are present. See #150
1 parent 3837c6d commit b18f082

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

pytest_cases/fixture_parametrize_plus.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -775,6 +775,10 @@ def _apply(test_func):
775775

776776
else:
777777
# there are fixture references: we will create a specific decorator replacing the params with a "union" fixture
778+
if indirect:
779+
warn("Using `indirect=True` at the same time as fixture references in `@parametrize` is not guaranteed to "
780+
"work and is strongly discouraged for readability reasons. See "
781+
"https://github.com/smarie/python-pytest-cases/issues/150")
778782

779783
# First unset the pytest.param id we have set earlier in _process_argvalues: indeed it is only needed in
780784
# the case above where we were defaulting to legacy @pytest.mark.parametrize .

0 commit comments

Comments
 (0)