Timo Röhling
2024-06-18 14:30:01 UTC
Reply
PermalinkControl: tags 1073443 + upstream
It looks like rerunfailures plugin erroneously deletes the session
teardown from the execution stack if a test fails and is rerun. You
can reproduce the bug with the attached script
pytest_session_fixture.py:
- Running `pytest pytest_session_fixture.py -s` will show "session teardown"
is run regardless of the flaky test outcome
- Running `pytest pytest_session_fixture.py -s --reruns 1` will only show
"session teardown" if the flaky test succeeds on the first try.
This bug was exposed by a change in pytest 8.2 and currently
prevents pytest from migrating to testing.
Cheers
Timo
--
â¢â£Žâ Ÿâ »â¢¶â£Šâ ââââââââââââââââââââââââââââââââââââââââââââââââââââââ®
⣟â ⢠â â ⣿⡠â Timo Röhling â
⢿â¡â â ·â â â â 9B03 EBB9 8300 DF97 C2B1 23BF CC8C 6BDD 1403 F4CA â
â â ³â£â â â â â°âââââââââââââââââââââââââââââââââââââââââââââââââââââ¯
â¢â£Žâ Ÿâ »â¢¶â£Šâ ââââââââââââââââââââââââââââââââââââââââââââââââââââââ®
⣟â ⢠â â ⣿⡠â Timo Röhling â
⢿â¡â â ·â â â â 9B03 EBB9 8300 DF97 C2B1 23BF CC8C 6BDD 1403 F4CA â
â â ³â£â â â â â°âââââââââââââââââââââââââââââââââââââââââââââââââââââ¯