Skip to content

Preserve rerun status for teardown failures - #367

Open
LouisDeconinck wants to merge 1 commit into
pytest-dev:masterfrom
LouisDeconinck:fix/rerun-teardown-report-366
Open

Preserve rerun status for teardown failures#367
LouisDeconinck wants to merge 1 commit into
pytest-dev:masterfrom
LouisDeconinck:fix/rerun-teardown-report-366

Conversation

@LouisDeconinck

Copy link
Copy Markdown

Fixes #366

When a test phase triggers a rerun, a later failed phase from the same attempt must also be reported as a rerun. Previously, a teardown failure after a failed test remained an error even when the rerun passed.

This changes only failed later-phase reports; successful reports keep their existing outcome. Added the issue reproducer, updated the persistent-teardown expectation, and added the required bugfix changelog fragment.

Checks:

  • uv run pytest -q (217 passed, 9 skipped)
  • uv run --group dev mypy --ignore-missing-imports src/pytest_rerunfailures.py
  • uv run --with pre-commit pre-commit run --all-files
  • git diff --check

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.

Teardown error persists after successful rerun when test and teardown both fail initially

1 participant