test_graph_stats_survives_a_database_with_no_tables

Tests › tests/test_graph_stats.py

passed Passed in the packaged run.

What this test is for

Why it exists

NON-RAISING, on the thinnest possible input.

Given

  1. bare = tmp_path / "empty.db"
  2. sqlite3.connect(bare).close()
  3. stats = graph_stats(bare)
→

When

  1. —
→

Then

  1. ✓ stats.symbol_rows equals 0
  2. ✓ stats.symbol_provenance equals {}
  3. ✓ {s.state for s in stats.layers} equals {LAYER_STATE_ABSENT}
  4. ✓ 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

callercallercallercallerclew/query/_common.pyclew/query/_common.pyclew/query/_common.pyclew/query/_common.pyclew/query/recovery.pyclew/query/recovery.pyclew/query/recovery.pyclew/query/recovery.pydossier18. _documentation_mentions → table_exists18table_exists19. _documentation_mentions → has_columns19has_columns20. has_columns → table_exists20table_exists21–22. _hint_from → _name_exists21_name_exists +1 more

… 56 steps between

callercallercallercallerclew/query/payload.pyclew/query/payload.pyclew/query/payload.pyclew/query/payload.pyclew/query/_common.pyclew/query/_common.pyclew/query/_common.pyclew/query/_common.pyother filesother filesother filesother filesdossier79. _macro_def → symbol_provenance79symbol_provenance80. symbol_provenance → records_provenance80records_provenance81. records_provenance → has_columns81has_columns▶ test enters82. _gate_definitions → _gate_definition_gaps82_gate_definition_gaps83. _flatten_subject → _empty_callers_note83_empty_callers_note

… 143 later steps

2 more

tests/test_graph_stats.py:288 · its file's page

What it checks (4)

  1. assert stats.symbol_rows == 0 not attributed
  2. assert stats.symbol_provenance == {} not attributed
  3. assert {s.state for s in stats.layers} == {LAYER_STATE_ABSENT} not attributed
  4. assert stats.calls.row_meaning == EMPTY_ROW_MEANING not 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.