Show each rerun attempt outcome in summary - #370
Conversation
icemac
left a comment
There was a problem hiding this comment.
Review of the rerun-summary change. Findings 1–3 (xdist crash reruns, teardown tracebacks, xdist ordering) were reproduced by running the plugin on master vs. this branch; the full suite passes on the branch because the existing summary tests only assert outcomes.
— Comment created by Claude
- Read terminalreporter.stats directly instead of a dedicated RerunSummary plugin, which duplicated the same reports. - Stamp report.rerun on xdist crash reports in pytest_handlecrashitem so crash reruns appear in the summary instead of vanishing. - Emit one line per report (grouped by nodeid, ordered by attempt and phase) so call+teardown failures in one attempt keep both tracebacks and the final teardown ERROR is not hidden behind the call FAILED. - Take status words and colours from pytest_report_teststatus instead of a second hand-maintained markup table; traceback lines are no longer re-parsed as status words. - Cover ERROR and SKIPPED lines plus crash-summary and xdist grouping in tests; scope colour assertions to the rerun section.
|
Thanks for the thorough review — all findings reproduced and addressed in 97fb513:
On XFAIL/XPASS specifically: xfail-marked tests never reach the summary in practice — Verified locally: 248 tests pass on pytest 9.1.1 + xdist 3.8.0, ruff check/format clean. |
Fixes #191. The rerun summary now preserves one report per test attempt and displays each rerun and final outcome with pytest-style status colors. Tests: .venv/bin/pytest -q; pre-commit run --all-files --show-diff-on-failure.