Expand description
The unit colocated-test check (Python — issue #15; TypeScript — issue #18;
exemptions — issue #32).
Convention (README “Colocated Test”; internals/*/testing.md): a source
file is unit-tested by a colocated test named after it — foo.py →
foo_test.py (Python), foo-bar.ts → foo-bar.test.ts (TypeScript).
missing_unit_tests walks a tree for a Language and returns every
source file with no such sibling — an “orphan”. Test files are what the
check looks for, never subjects.
Two things are not orphans even without a colocated test (issue #32): a file
that holds no code (empty or comment-only — e.g. a bare __init__.py), which
is not a subject at all, and a file listed in the config exempt table,
which is a deliberate, reason-required omission. Everything else must be
tested — there is no automatic name- or shape-based exemption.
Enums§
- Language
- A language whose colocated unit-test convention can be checked.
Functions§
- missing_
unit_ tests - Walk
rootrecursively and return every source file (forlanguage) that has no colocated unit test, sorted for deterministic output.