test_list_files_inventory¶
Tests › tests/test_query.py
What this test is for
Why it exists
Every real source file is listed with a symbol count; doxygen's synthetic bracket rows ('[STL]', '[generated]') are not files and must not appear.
Verifies REQ-DDB-QUERY-002
Given
- —
When
files = q.list_files(rich_db)paths = [f.path for f in files]
Then
- ✓ paths equals sorted(paths)
- ✓ [p for p in paths if p.startswith("[")] is false
- ✓ any(p.endswith("sensor_driver.c") for p in paths) holds
- ✓ any(f.symbol_count > 0 for f in files) holds
What it exercises
The parts of the system's flows this test ran, measured by per-test coverage: lit steps ran in this test, dimmed ones did not, and ▶ marks where the test called in. Each title opens the whole flow with these steps lit.
clew — `main` (clew/cli.py) · 5 of 400 steps
… 215 earlier steps
… 119 steps between
… 53 later steps
2 more
- `main` (scripts/export_parity.py) · 5 of 203 steps
- Look up one name: everything the index holds about it · 1 of 226 steps
tests/test_query.py:882 · its file's page
What it checks (4)
assert paths == sorted(paths)not attributedassert not [p for p in paths if p.startswith("[")], "synthetic path rows must be excluded"not attributedassert any(p.endswith("sensor_driver.c") for p in paths)not attributedassert any(f.symbol_count > 0 for f in files)observeslist_filesviafiles
Where the product reaches it
main→query_main→_payload→export_search→corpus_payload→_files_corpus→list_files(flow)
Call flow
What it reaches
Each row runs from this test, through the calls it makes, to the code a requirement names. If that code breaks, the test's checks are what should catch it. Reaching is not proving: a check only proves what it observes. No mutation records were given, so these rows say what the test REACHES.
Requirements it verifies (1)
| requirement | linked by | implementers exercised |
|---|---|---|
| REQ-DDB-QUERY-002 | catalog | unknown |
Also reaches 2 requirements
Its run touches their code; that is reach, not proof.
- REQ-DDB-QUERY-001 measured
- REQ-DDB-QUERY-003 measured