test_graph_stats_survives_a_database_with_no_tables¶
Tests › tests/test_graph_stats.py
What this test is for
Why it exists
NON-RAISING, on the thinnest possible input.
Given
bare = tmp_path / "empty.db"sqlite3.connect(bare).close()stats = graph_stats(bare)
When
- —
Then
- ✓ stats.symbol_rows equals 0
- ✓ stats.symbol_provenance equals {}
- ✓ {s.state for s in stats.layers} equals {LAYER_STATE_ABSENT}
- ✓ stats.calls.row_meaning equals EMPTY_ROW_MEANING
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 · 2 of 226 steps
… 17 earlier steps
… 56 steps between
… 143 later steps
2 more
- clew — `main` (clew/cli.py) · 2 of 400 steps
- `main` (scripts/export_parity.py) · 2 of 203 steps
tests/test_graph_stats.py:288 · its file's page
What it checks (4)
assert stats.symbol_rows == 0not attributedassert stats.symbol_provenance == {}not attributedassert {s.state for s in stats.layers} == {LAYER_STATE_ABSENT}not attributedassert stats.calls.row_meaning == EMPTY_ROW_MEANINGnot attributed
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 6 requirements
Its run touches their code; that is reach, not proof.
- REQ-DDB-INDEX-004 measured
- REQ-DDB-MCP-001 measured
- REQ-DDB-PIPE-005 measured
- REQ-DDB-QUERY-001 measured
- REQ-DDB-QUERY-003 measured
- REQ-DDB-QUERY-008 measured