test_the_coverage_meta_publishes_both_ratios¶
Tests › tests/test_ast_symbols.py
What this test is for
Why it exists
A number that lives only in a warning is gone by query time — the defect this project has now fixed three times. The documented ratio has to be persisted for the same reason the barren one is.
Given
db, repo = barren_index
When
recover_ast_symbols(db, repo, None)meta = measure_index_coverage(db, repo).as_meta()
Then
- ✓ meta contains "barren_ratio"
- ✓ meta contains "undocumented_ratio"
- ✓ meta["undocumented_files"] equals "2"
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) · 7 of 400 steps
… 70 earlier steps
… 313 later steps
tests/test_ast_symbols.py:649 · its file's page
What it checks (3)
assert "barren_ratio" in metaobservesmeasure_index_coverageviametaassert "undocumented_ratio" in metaobservesmeasure_index_coverageviametaassert meta["undocumented_files"] == "2"observesmeasure_index_coverageviameta
Where the product reaches it
No product flow reaches this code: no product entry point's flow calls any of the functions this test calls.
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 8 requirements
Its run touches their code; that is reach, not proof.
- REQ-DDB-INDEX-002 measured
- REQ-DDB-INDEX-003 measured
- REQ-DDB-INDEX-004 measured
- REQ-DDB-PIPE-003 measured
- REQ-DDB-PIPE-011 measured
- REQ-DDB-PIPE-012 inferred
- REQ-DDB-SCHEMA-012 measured
- REQ-DDB-WIKI-054 inferred