test_an_unreadable_database_yields_no_hint¶
Tests › tests/test_recovery_hint.py
What this test is for
Why it exists
NEVER RAISES ON THE MISS PATH. This runs while building a reply that has already failed, so a database that cannot be opened — the very case `unbuilt_index_message` exists for — must not turn a clean negative into a traceback.
Given
- —
When
recovery_hint(None, "execute")recovery_hint(tmp_path / "missing.db", "execute")junk = tmp_path / "junk.db"
3 more
junk.write_text("this is not a database", encoding="utf-8")recovery_hint(junk, "execute")recovery_hint(tmp_path / "missing.db", None)
Then
- ✓ recovery_hint(None, "execute") equals ""
- ✓ recovery_hint(tmp_path / "missing.db", "execute") equals ""
- ✓ recovery_hint(junk, "execute") equals ""
- ✓ recovery_hint(tmp_path / "missing.db", None) equals ""
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 · 11 of 226 steps
… 6 earlier steps
… 201 later steps
tests/test_recovery_hint.py:283 · its file's page
What it checks (4)
assert recovery_hint(None, "execute") == ""observesrecovery_hintassert recovery_hint(tmp_path / "missing.db", "execute") == ""observesrecovery_hintassert recovery_hint(junk, "execute") == ""observesrecovery_hintassert recovery_hint(tmp_path / "missing.db", None) == ""observesrecovery_hint
Where the product reaches it
dossier→_batched_dossiers→batch_payload→recovery_hint(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-QUERY-013 measured