test_calls_between_files_are_counted¶
Tests › tests/test_wiki_web.py
What this test is for
Why it exists
`file_links` = [from file slice, to file slice, calls], across files only.
Given
data = _data(db)files = data["files"]
5 more
total = 0for a, b, calls in data["file_links"]: assert a != b and calls >= 1 total += callsnodes = data["nodes"]index = {(f["block"], f["file"]): i for i, f in enumerate(files)}cross = sum( 1 for x, y in data["edges"] if index[(nodes[x]["block"], nodes[x]["file"])] != index[(nodes[y]["block"], nodes[y]["file"])] )
When
- —
Then
- ✓ total equals cross
- ✓ total is greater than 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_web.py:290 · its file's page
What it checks (2)
assert a != b and calls >= 1not attributedassert total == cross and total > 0not attributed
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
test_calls_between_files_are_counted→_dataWhat 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-022 measured