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
test_rerun integration tests fail with pytest-rerunfailures 16.7 #1085
With pytest-rerunfailures 16.7, both rerun integration tests fail:
FAILED testing/test_integration.py::TestHTML::test_rerun - AssertionError: Expected <5 Reruns> to match pattern <2 Reruns>, but did not.
FAILED testing/test_integration.py::TestLogCapturing::test_rerun - AssertionError: Expected <5 Reruns> to match pattern <2 Reruns>, but did not.
The test uses @pytest.mark.flaky(reruns=2) but the report shows 5 reruns.
Same result with the app.js/style.css shipped in the 4.2.0 sdist, so it
is not related to the frontend build.
Bisected: it starts with pytest-rerunfailures 16.7, which now runs and
reports teardown after each failed attempt
(setup, call:rerun, teardown, setup, call:rerun, teardown, ...).
pytest_runtest_logreport in basereport.py treats the first non-rerun
teardown as "finished" and processes all stored reports without
clearing them, so reruns are processed again at each teardown:
1 + 2 + 2 = 5 "Rerun" rows (3 of them with 0 ms duration).
Fix proposed in #1086: pytest-rerunfailures 16.7 reports a teardown after each rerun attempt, which pytest-html treated as the end of the test, so reruns were processed again (1 + 2 + 2 = 5).
Activity
nicozdeb commentedon Oct 30, 2026
Fix proposed in #1086: pytest-rerunfailures 16.7 reports a teardown after each rerun attempt, which pytest-html treated as the end of the test, so reruns were processed again (1 + 2 + 2 = 5).