You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
rtk pytest / pipe -f pytest list each failing test twice (FAILURES block and short summary line) #4897
rtk pytest and rtk pipe -f pytest print each failing test twice: once from the FAILURES block, and again from pytest's short test summary info line for the same test. The header counts one failure, the list numbers two.
The same output comes back with -rfE, -ra and -q. In pipe mode this is the default, because pytest's default -rfE always prints the short summary. The run path hides it only because rtk injects -rxX, which drops f from the report; rtk pytest -rfE test_f.py lists the failure twice as well.
Where: filter_pytest_output (src/cmds/python/pytest_cmd.rs) pushes every FAILED/ERROR line of the summary section into failures (line 198) without checking whether a FAILURES block for that test was already collected. The block is keyed by the bare test name (test_bad), the summary line by the node id (test_f.py::test_bad), so a match has to compare on the trailing name, or prefer the block and keep the summary line only for tests that have none (--tb=no, where rtk relies on -rfExX).
Expected: one entry per failing test, with the traceback when there is one; the count in the header and the length of the list agree.
Draft PR #3047 deduplicates ERROR summary lines against the ERRORS section only; FAILED lines and setup errors (ERROR x::t against a block headed ERROR at setup of t) are not covered.
Activity
rtk-wshm-sync-bot commentedon Oct 31, 2026
🔍 Automated Triage
bugmediumSummary
rtk pytest/pipe double-lists failing tests (FAILURES block + short summary line) because filter_pytest_output doesn't dedupe summary lines against already-collected FAILURES entries.
📁 Relevant files
src/cmds/python/pytest_cmd.rsSuggested Actions
FAILED/ERRORlines against collected FAILURES/ERRORS blocks by trailing test name, not exact key, in …ERROR at setup of t)-rfE,-ra,-q, and the run-path-rxXdefaultTriaged automatically by wshm · This is an automated analysis, not a human review.