Skip to content

fix: prevent rerun when teardown error matches --rerun-except#338

Open
pctablet505 wants to merge 2 commits into
pytest-dev:masterfrom
pctablet505:fix-270-rerun-except-teardown
Open

fix: prevent rerun when teardown error matches --rerun-except#338
pctablet505 wants to merge 2 commits into
pytest-dev:masterfrom
pctablet505:fix-270-rerun-except-teardown

Conversation

@pctablet505

Copy link
Copy Markdown

Fixes #270

When --rerun-except is used and a teardown failure matches the excluded error, the test was still rerun because only the current report's stage was checked for terminal errors. Now all stages of the current execution are considered, so a terminal teardown error prevents reruns as expected.

@pctablet505
pctablet505 marked this pull request as ready for review July 17, 2026 12:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

rerun-except option ignores teardown error

1 participant