test_a_small_barren_file_is_below_the_line_floor

Tests › tests/test_coverage.py

passed Passed in the packaged run.

What this test is for

Why it exists

A stub header or a re-export `__init__.py` yielding nothing proves nothing.

Given

  1. files = _healthy(MIN_SUBSTANTIVE_FILES) + [(f"src/stub_{n}.h", 10, 0) for n in range(40)]
  2. db_path, root = _coverage_db(tmp_path, files)
→

When

  1. coverage = measure_index_coverage(db_path, root)
→

Then

  1. ✓ coverage.substantive_files equals MIN_SUBSTANTIVE_FILES
  2. ✓ coverage.barren_files equals 0
  3. ✓ coverage.alarming is false

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

What it checks (3)

  1. assert coverage.substantive_files == MIN_SUBSTANTIVE_FILES observes measure_index_coverage via coverage
  2. assert coverage.barren_files == 0 observes measure_index_coverage via coverage
  3. 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_a_small_barren_file_is_below_the_line_floor→_healthy→_coverage_db→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_a_small_barren_file_is_below_the_line_floor · 3 checksmeasure_index_coverage_file_yieldsmemoizedREQ-DDB-INDEX-002 · measuredmeasure_index_coverageREQ-DDB-INDEX-003 · measured
Also reaches 3 requirements

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