test_each_file_is_one_slice_of_its_block¶
Tests › tests/test_wiki_web.py
What this test is for
Why it exists
OWNER (2026-11-22): "the by file divides and interconnects on zoom in the map". A file is one contiguous slice of its block's wedge (ordered by file, sized by its functions, disjoint), the same slice on every ring, and each of its functions sits inside it.
Given
data = _data(db)files = data["files"]
When
for bi, block in enumerate(data["blocks"]): mine = [f for f in files if f["block"] == bi] assert [f["file"] for f in mine] == sorted(f["file"] for f in mine) assert abs(mine[0]["a0"] - block["a0"]) < 1e-6 and abs(mine[-1]["a1"] - block["a1"]) < 1e-6 assert all(mine[i]["a1"] <= mine[i + 1]["a0"] + 1e-9 for i in range(len(mine) - 1))slices = {(f["block"], f["file"]): f for f in files}for n in data["nodes"]: s = slices[(n["block"], n["file"])] angle = math.atan2(n["y"], n["x"]) % (2 * math.pi) assert s["a0"] - 1e-6 <= angle <= s["a1"] + 1e-6, (n["name"], n["file"])
Then
- —
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:269 · its file's page
What it checks (4)
assert [f["file"] for f in mine] == sorted(f["file"] for f in mine)not attributedassert abs(mine[0]["a0"] - block["a0"]) < 1e-6 and abs(mine[-1]["a1"] - block["a1"]) < 1e-6not attributedassert all(mine[i]["a1"] <= mine[i + 1]["a0"] + 1e-9 for i in range(len(mine) - 1))observesallassert s["a0"] - 1e-6 <= angle <= s["a1"] + 1e-6, (n["name"], n["file"])not attributed
Where the product reaches it
dossier→_rank_enum_over_mirror→_class_side_is_only_enum_mirrors→all(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.
Also reaches 5 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
- REQ-DDB-WIKI-054 inferred