test_a_tiny_index_never_alarms_however_barren

Tests › tests/test_coverage.py

passed Passed in the packaged run.

What this test is for

Why it exists

A ratio needs a denominator worth dividing by: two files, one barren, is 50% and means nothing. Every real target measures 116 substantive files or more, so the floor cannot mask a real case.

Given

  1. db_path, root = _coverage_db(tmp_path, [("src/a.c", BIG, 0), ("src/b.c", BIG, 6)])
→

When

  1. coverage = measure_index_coverage(db_path, root)
→

Then

  1. ✓ coverage.barren_ratio equals 0.5
  2. ✓ coverage.alarming is false

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

What it checks (2)

  1. assert coverage.barren_ratio == 0.5 observes measure_index_coverage via coverage
  2. assert not coverage.alarming, "a two-file index is not evidence of anything" 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_tiny_index_never_alarms_however_barren→_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_tiny_index_never_alarms_however_barren · 2 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.