You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fixtures: --fixtures-per-test crashes on fixture-using doctest #15051
I independently reproduced this on Windows before the competing fix, using pytest main 6a0de9be56365e75ff30d75cee9654739ca95f97, Python 3.12.6, and the following minimal fixture-using doctest:
python -m pytest --doctest-glob="*.txt" -q test_doctest.txt passed (1 passed). The same run with --fixtures-per-test raised AttributeError: 'DoctestItem' object has no attribute 'function' in _show_fixtures_per_test and incorrectly exited 0. This confirms the report on Windows as well as Linux. I did not create a duplicate fix because #15055 already addresses the issue.
Activity
fixtures: fix lineno off-by-one in --fixtures/--fixtures-per-test and…
kilisamemarisaaa commentedon Sep 19, 2026
I independently reproduced this on Windows before the competing fix, using pytest main
6a0de9be56365e75ff30d75cee9654739ca95f97, Python 3.12.6, and the following minimal fixture-using doctest:python -m pytest --doctest-glob="*.txt" -q test_doctest.txtpassed (1 passed). The same run with--fixtures-per-testraisedAttributeError: 'DoctestItem' object has no attribute 'function'in_show_fixtures_per_testand incorrectly exited 0. This confirms the report on Windows as well as Linux. I did not create a duplicate fix because #15055 already addresses the issue.