test_an_unreadable_database_fails_soft

Tests › tests/test_coverage.py

passed Passed in the packaged run.

What this test is for

Why it exists

Coverage describes a build that has ALREADY SUCCEEDED, so a measurement that raises must not destroy the index it describes. An all-zero measurement is also what `alarming` correctly reads as "not enough sample", so failing soft cannot manufacture an alarm either.

Given

  1. missing = tmp_path / "nope.db"
→

When

  1. coverage = measure_index_coverage(missing, tmp_path)
→

Then

  1. ✓ coverage equals IndexCoverage(0, 0, 0, ())
  2. ✓ coverage.alarming is false

tests/test_coverage.py:304 · its file's page

What it checks (2)

  1. assert coverage == IndexCoverage(0, 0, 0, ()) observes measure_index_coverage via coverage
  2. assert not coverage.alarming observes measure_index_coverage via coverage

Where the product reaches it

No product flow reaches this code: no product entry point's flow calls any of the functions this test calls.

Call flow

test_an_unreadable_database_fails_soft→measure_index_coverage

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.

test_an_unreadable_database_fails_soft · 2 checksmeasure_index_coverage_file_yieldsmemoizedREQ-DDB-INDEX-002 · inferredmeasure_index_coverageREQ-DDB-INDEX-003 · measured
Also reaches 2 requirements

Its run touches their code; that is reach, not proof.