QA-PY-009 — Commented-out test
Generated from the rule registry. Get the same detail from the CLI with
mjolnir explain QA-PY-009.
| Field | Value |
|---|---|
| Severity | warning |
| Confidence | high |
| Tier | extended |
| Measured FP rate | 6% (n=18) |
| Evidence level | E2 |
| QA impact | Test hygiene debt (HYGIENE) |
| False-positive risk (author estimate) | medium |
| Autofix available | no |
| Languages | python |
| Frameworks | pytest |
| Detection strategy | LEXICAL (regex heuristic) |
| Introduced in | v0.3.0 |
Why this fails in production
Disabled tests hide known-unverified behavior behind a green checkmark and rot silently.
What gets flagged (real detector output)
Commented-out test detected.Example from this rule's own must-fire fixture: tests/fixtures/QA-PY-009/must-fire/commented.py
The fix
Re-enable the test, or delete it with a tracked issue referencing what it covered.
Confirmed NOT to fire on the corresponding clean pattern
Verified against tests/fixtures/QA-PY-009/must-not-fire/clean.py — a legitimate, similar-looking pattern this rule correctly leaves alone.
Corpus-measured false-positive risk
Real occurrence counts from npm run corpus:audit against actively-maintained OSS repos — reproduce yourself, don't just trust this table (see the false-positive audit):
| Repo | Occurrences |
|---|---|
| getsentry-sentry | 4 |
| positive-fixtures | 10 |
| pytest-dev-pytest | 3 |
| reflex-dev-reflex | 1 |