test_lens_facts_ride_on_components_and_absent_sources_stay_absent¶
Tests › tests/test_wiki_graph.py
What this test is for
Why it exists
NO IMPACT REPORT, NO `changed` KEY; an empty report is a measured zero everywhere.
Given
evidence = [_Row("R-1", "PASS", (("save", "pkg/core/store.py", 1),))]
When
plain = {c["id"]: c for c in build_graph(db, evidence, None)["components"]}all("changed" not in c for c in plain.values())impact = [{"req_id": "R-1", "functions": [{"name": "save", "file": "pkg/core/store.py"}]}]measured = {c["id"]: c for c in build_graph(db, evidence, impact)["components"]}
Then
- ✓ plain["pkg/core"]["requirements"] equals {"PASS": 1}
- ✓ plain["pkg/api"] does not contain "requirements"
- ✓ all("changed" not in c for c in plain.values()) holds
- ✓ measured["pkg/core"]["changed"] equals 1
- ✓ measured["pkg/api"]["changed"] equals 0
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.
Build this wiki from the index · 20 of 400 steps
… 140 earlier steps
… 234 later steps
tests/test_wiki_graph.py:91 · its file's page
What it checks (4)
assert plain["pkg/core"]["requirements"] == {"PASS": 1}observesbuild_graphviaplainassert "requirements" not in plain["pkg/api"]observesbuild_graphviaplainassert all("changed" not in c for c in plain.values())observesallassert measured["pkg/core"]["changed"] == 1 and measured["pkg/api"]["changed"] == 0observesbuild_graphviameasured
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 4 requirements
Its run touches their code; that is reach, not proof.
- REQ-DDB-QUERY-001 measured
- REQ-DDB-QUERY-003 measured
- REQ-DDB-WIKI-019 measured
- REQ-DDB-WIKI-054 inferred