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
pytest filter reports "No tests collected" for runs that executed and passed (false negative summary) #5016
rtk pytest reports "Pytest: No tests collected" for runs that actually executed and passed tests. Verified today on rtk 0.42.4 (Homebrew, macOS 15, arm64):
Full-suite case is worse in terms of trust: 3891 passed / 12 skipped rendered as "No tests collected". This matches the family of #2317 / #2960 / #4178 (benign summary masks the real result) but with the opposite sign — a successful run is reported as zero tests, so anyone using rtk-filtered pytest output as an acceptance signal draws a false negative conclusion.
Repro
Any repo whose pytest run exits 0 with collected+passed tests (verified with plain -q and --co -q).
Run through the rtk pytest filter.
Output: Pytest: No tests collected, exit code 0.
Expected
Either pass through the collected/passed counts from the pytest summary line, or emit a neutral "N passed" summary; never report "No tests collected" for a run with a non-empty test count.
Trigger is output-shape dependent, not project dependent: seen on both a single file (pytest tests/x.py -q, 4 passed) and a full suite (3891 passed / 12 skipped). Both render as Pytest: No tests collected.
rtk proxy <cmd> bypasses the filter and shows the real counts, so the underlying pytest invocation is fine — the regression is purely in the summary-line parsing you flagged (src/pytest/summary.rs).
One more data point: pytest --co -q (collect-only, no executed tests) also renders as "No tests collected", so the parser likely treats "no summary line with counts" and "zero collected" as the same branch.
Activity
rtk-wshm-sync-bot commentedon Nov 5, 2026
🔍 Automated Triage
bughighSummary
rtk pytest filter misreports successful, non-empty test runs as 'No tests collected', producing false-negative acceptance signals.
📁 Relevant files
src/pytest/filter.rssrc/pytest/summary.rsSuggested Actions
--co -qand full-suite run) to confirm parser path hitTriaged automatically by wshm · This is an automated analysis, not a human review.
dahai80 commentedon Nov 5, 2026
Thanks for the triage. Adding environment detail for the reproduce step:
pytest tests/x.py -q, 4 passed) and a full suite (3891 passed / 12 skipped). Both render asPytest: No tests collected.rtk proxy <cmd>bypasses the filter and shows the real counts, so the underlying pytest invocation is fine — the regression is purely in the summary-line parsing you flagged (src/pytest/summary.rs).pytest --co -q(collect-only, no executed tests) also renders as "No tests collected", so the parser likely treats "no summary line with counts" and "zero collected" as the same branch.