test_absent_corpus_is_reported_as_absent¶
Tests › tests/test_filedocs.py
What this test is for
Why it exists
An index built before build 23 has no `file_docs` table. A detector that cannot look must not report a negative — this repo's most-repeated lesson, applied to its newest table.
Given
db, repo = indexed
When
has_file_docs(db)file_doc_rows(sqlite3.connect(db), ["anything"])ingest_file_docs(db, repo)
Then
- ✓ has_file_docs(db) is False
- ✓ file_doc_rows(sqlite3.connect(db), ["anything"]) equals []
- ✓ has_file_docs(db) is True
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) · 3 of 400 steps
… 244 earlier steps
… 38 steps between
… 107 later steps
1 more
- `main` (scripts/export_parity.py) · 3 of 203 steps
tests/test_filedocs.py:306 · its file's page
What it checks (3)
assert has_file_docs(db) is Falseobserveshas_file_docsassert file_doc_rows(sqlite3.connect(db), ["anything"]) == []observesfile_doc_rowsassert has_file_docs(db) is Trueobserveshas_file_docs
Where the product reaches it
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.
Also reaches 7 requirements
Its run touches their code; that is reach, not proof.
- REQ-DDB-INDEX-002 measured
- REQ-DDB-PIPE-008 measured
- REQ-DDB-PIPE-014 measured
- REQ-DDB-QUERY-001 measured
- REQ-DDB-QUERY-003 measured
- REQ-DDB-QUERY-007 measured
- REQ-DDB-SCHEMA-014 measured