test_rows_are_grouped_by_file_and_shared_values_stated_once¶
Tests › tests/test_compact_wire.py
What this test is for
Why it exists
Groups by file in first-seen order; the modal values move to edge_defaults.
Given
- —
When
compact = compact_neighbours(copy.deepcopy(_FLAT))first = compact["callers"][0]["rows"][0]
Then
- ✓ [g["file"] for g in compact["callers"]] equals ["x.ts", "y.ts"]
- ✓ compact["edge_defaults"] equals { "source": "ast", "confidence": "resolved", "edge_class": "call", }
- ✓ first equals {"name": "a"}
- ✓ compact["callers"][0]["rows"] contains {"name": "c", "source": "doxygen_sqlite"}
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.
Look up one name: everything the index holds about it · 3 of 226 steps
… 104 earlier steps
… 112 later steps
tests/test_compact_wire.py:109 · its file's page
What it checks (4)
assert [g["file"] for g in compact["callers"]] == ["x.ts", "y.ts"]observescompact_neighboursviacompactassert compact["edge_defaults"] == { "source": "ast", "confidence": "resolved", "edge_class": "call", }observescompact_neighboursviacompactassert first == {"name": "a"}, firstnot attributedassert {"name": "c", "source": "doxygen_sqlite"} in compact["callers"][0]["rows"]observescompact_neighboursviacompact
Where the product reaches it
dossier→_wire_shape→compact_neighbours(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 2 requirements
Its run touches their code; that is reach, not proof.
- REQ-DDB-QUERY-014 measured
- REQ-DDB-WIKI-054 inferred