Skip to content

QA-PY-009 — Commented-out test ​

← Back to the rule catalog

Generated from the rule registry. Get the same detail from the CLI with mjolnir explain QA-PY-009.

FieldValue
Severitywarning
Confidencehigh
Tierextended
Measured FP rate6% (n=18)
Evidence levelE2
QA impactTest hygiene debt (HYGIENE)
False-positive risk (author estimate)medium
Autofix availableno
Languagespython
Frameworkspytest
Detection strategyLEXICAL (regex heuristic)
Introduced inv0.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):

RepoOccurrences
getsentry-sentry4
positive-fixtures10
pytest-dev-pytest3
reflex-dev-reflex1

Released under the MIT License.