Four suites in this workspace were found hollow in one week, each hollow in a
different way, and every one of them had read as fine for months. The pattern
is not a bug in any of them — it is that a test suite reports on the code and
nothing reports on the suite.
So: tools/tests/test_suite_hygiene.py walks every test_*.py by AST (no imports,
so it works with or without any project venv) and asserts three things.
* No file collects zero tests. A test_*.py with no collectable function is
green and hollow.
* No test requests a fixture nothing declares. `def test_x(suite)` makes
pytest error on a missing fixture, and twelve such errors read as a config
nit for months while twelve real audio cases went unrun.
* No module-level sys.exit(). It fires during COLLECTION and takes the whole
directory down instead of failing one test — which is how `pytest
tools/tests/` once ran zero tests while 273 passed individually.
It also guards itself: if the glob ever stops finding files, every rule above
passes vacuously, so the file count has a floor of its own.
Verified by mutation, three planted defects, one per rule — a hollow file, a
`def test_thing(suite)`, and a trailing sys.exit(0). Each is caught by name and
the tree comes back clean.
Also splits tools/tests/test_setlist.py, whose 22 checks reported as one
aggregate assertion that named the file and not the fault. check() now records
each outcome and pytest replays them one named test per check; the aggregate
stays as the belt to those braces, and the file still runs as a script.
Every count is pinned, because the failure being guarded against is not a wrong
answer but an empty one, and an empty one is invisible without a number to
compare against. That guard earned itself immediately: I had counted 28 checks
by eye and the truth was 22.
| Name |
Last commit
|
Last update |
|---|---|---|
| .gitea/workflows | Loading commit data... | |
| armada | Loading commit data... | |
| blocks | Loading commit data... | |
| blog | Loading commit data... | |
| config/wireplumber | Loading commit data... | |
| copycat | Loading commit data... | |
| docs | Loading commit data... | |
| gifts | Loading commit data... | |
| lib-parvagues | Loading commit data... | |
| live | Loading commit data... | |
| mix | Loading commit data... | |
| output | Loading commit data... | |
| releases | Loading commit data... | |
| sandbox | Loading commit data... | |
| study | Loading commit data... | |
| test | Loading commit data... | |
| tools | Loading commit data... | |
| utils | Loading commit data... | |
| visuals | Loading commit data... | |
| viz | Loading commit data... | |
| .gitignore | Loading commit data... | |
| BootTidal.hs | Loading commit data... | |
| BootTidal.hs.broken | Loading commit data... | |
| BootTidal.visuals.broken.hs | Loading commit data... | |
| CLAUDE.md | Loading commit data... | |
| EVENING.md | Loading commit data... | |
| FOH_MASTER.md | Loading commit data... | |
| LAST_THIRD.md | Loading commit data... | |
| LICENSE | Loading commit data... | |
| Logo.xcf | Loading commit data... | |
| MORNING.md | Loading commit data... | |
| PatchBay_MultiChannel.xml | Loading commit data... | |
| PatchBay_Perf.xml | Loading commit data... | |
| PatchBay_Perf5.1.xml | Loading commit data... | |
| README.md | Loading commit data... | |
| RUNBOOK.md | Loading commit data... | |
| SHOPPING_LIST.md | Loading commit data... | |
| TASKS_DUMP.md | Loading commit data... | |
| backlog.md | Loading commit data... | |
| bullet_train.tidal | Loading commit data... | |
| collide.sh | Loading commit data... | |
| debug.tidal | Loading commit data... | |
| didacticpatternvisualizer.pde | Loading commit data... | |
| gig-up.sh | Loading commit data... | |
| gpu-mode.sh | Loading commit data... | |
| hello.sc | Loading commit data... | |
| init_midi.sh | Loading commit data... | |
| install_superdirt.sclang | Loading commit data... | |
| intro.md | Loading commit data... | |
| library.txt | Loading commit data... | |
| link_jack.sh | Loading commit data... | |
| link_samples.sh | Loading commit data... | |
| link_samples_all.txt | Loading commit data... | |
| main_fairbanks.scd | Loading commit data... | |
| notes.md | Loading commit data... | |
| parvagues-sc.service | Loading commit data... | |
| perf-audio.sudoers | Loading commit data... | |
| perf-tray.py | Loading commit data... | |
| perf-tray.service | Loading commit data... | |
| perf.sh | Loading commit data... | |
| process-palette.json | Loading commit data... | |
| realtime.tidal | Loading commit data... | |
| sample_watch.scd | Loading commit data... | |
| samples.txt | Loading commit data... | |
| setlist_opal2026.txt | Loading commit data... | |
| sketch.properties | Loading commit data... | |
| start_and_midi.scd | Loading commit data... | |
| test.tidal | Loading commit data... |