test_components_links_and_layout¶
Tests › tests/test_wiki_graph.py
What this test is for
Why it exists
CALLERS ABOVE CALLEES: pkg/api calls pkg/core, so it sits in a higher layer.
Given
- —
When
graph = build_graph(db, [], None)comps = {c["id"]: c for c in graph["components"]}link = next( edge for edge in graph["links"] if (edge["from"], edge["to"]) == ("pkg/api", "pkg/core") )
Then
- ✓ {"pkg/api", "pkg/core", "tests"} is at most set(comps)
- ✓ link["calls"] equals 1
- ✓ comps["pkg/api"]["y"] is less than comps["pkg/core"]["y"]
- ✓ comps["tests"]["test"] is True
- ✓ comps["pkg/core"]["test"] is False
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 · 19 of 400 steps
… 140 earlier steps
… 234 later steps
tests/test_wiki_graph.py:75 · its file's page
What it checks (4)
assert {"pkg/api", "pkg/core", "tests"} <= set(comps)not attributedassert link["calls"] == 1not attributedassert comps["pkg/api"]["y"] < comps["pkg/core"]["y"]not attributedassert comps["tests"]["test"] is True and comps["pkg/core"]["test"] is Falsenot attributed
Where the product reaches it
build_wiki→_build_site→build_graph(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 3 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