Skip to content

Report teardown after triggering rerun - #347

Merged
icemac merged 1 commit into
pytest-dev:masterfrom
janmrow:issue-237-report-teardown
Aug 18, 2026
Merged

Report teardown after triggering rerun#347
icemac merged 1 commit into
pytest-dev:masterfrom
janmrow:issue-237-report-teardown

Conversation

@janmrow

@janmrow janmrow commented Aug 17, 2026

Copy link
Copy Markdown
Contributor

Fixes #237.

When a test attempt triggered a rerun, pytest-rerunfailures stopped processing the remaining reports from this attempt. So a teardown report which had already been produced was not passed to pytest_runtest_logreport.

This change tracks if a rerun was triggered while still reporting the remaining phases of the current attempt.

It also adds regression coverage for:

  • the missing teardown report,
  • making sure multiple failed reports in one attempt still result in at most one rerun.

@icemac
icemac merged commit 793c15f into pytest-dev:master Aug 18, 2026
43 checks passed
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.

pytest_runtest_logreport does not report "teardown" when using pytest-rerunfailures

2 participants