test_an_index_without_the_table_still_resolves¶
Tests › tests/test_test_scope.py
What this test is for
Why it exists
FORWARD COMPATIBILITY IS THE POINT. Every index built before this stage has no `test_scope` table, and the query layer must not raise on one — a missing table is missing knowledge, not a reason to refuse an answer. The old ordering is asserted explicitly (the helper wins) so this test says WHICH behaviour the fallback is, rather than merely that it does not crash.
Given
conn = _fixture(tmp_path, mark=False)
When
try: assert not _common.table_exists(conn, "test_scope") got = _common.resolve_rowid(conn, "run_turn") rows = _common.function_candidates(conn, "run_turn") finally: conn.close()
Then
- ✓ got equals HELPER
- ✓ len(rows) equals 2
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 · 6 of 226 steps
… 45 earlier steps
… 155 steps between
… 11 later steps
1 more
- Build this wiki from the index · 4 of 400 steps
tests/test_test_scope.py:185 · its file's page
What it checks (3)
assert not _common.table_exists(conn, "test_scope")observestable_existsassert got == HELPER, ( "without the table the resolver must fall back to the in-place ordering, which picks " "the helper here — if this changed, the fallback is not the old behaviour" )observesresolve_rowidviagotassert len(rows) == 2, "candidates must still list every meaning"observesfunction_candidatesviarows
Where the product reaches it
Call flow
test_an_index_without_the_table_still_resolves→_fixture→table_exists→resolve_rowid→function_candidatesWhat 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-003 measured
- REQ-DDB-QUERY-010 measured