scan_tests
Scan a file or directory to find tests that cannot fail—assertions true by construction, missing assertions, empty bodies, or skipped tests. Each finding includes file and line for verification.
Instructions
Scan a file or directory for tests that cannot fail.
Reports tests that pass regardless of the behaviour of the code they claim to cover: assertions that are true by construction, tests with no assertion at all, empty bodies, and tests that are skipped while still appearing in the suite.
Python is analysed with the ast module and is exact. Rust and JavaScript/TypeScript
use a brace-matching text scanner, which is a heuristic tuned to miss cases rather than
invent them. Every finding carries a file and line so it can be checked directly.
Args:
path: File or directory to scan. Build and dependency directories (target,
node_modules, .venv, ...) are skipped automatically.
include_skipped: Include tests marked skipped or ignored. These always run green
because they do not run at all, but they are usually deliberate, so they are
reported at info severity.
max_findings: Cap on returned findings. The summary always counts every finding,
including any beyond the cap.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | ||
| max_findings | No | ||
| include_skipped | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||