test_a_prose_file_is_not_counted_as_barren

Tests › tests/test_coverage.py

passed Passed in the packaged run.

What this test is for

Why it exists

A markdown file is not barren; it is not code.

Given

  1. docs = [(f"docs/guide_{n}.md", BIG, 0) for n in range(MIN_SUBSTANTIVE_FILES + 5)]
  2. db_path, root = _coverage_db(tmp_path, docs, prose=tuple(name for name, _, _ in docs))
→

When

  1. coverage = measure_index_coverage(db_path, root)
→

Then

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

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

What it checks (3)

  1. assert coverage.indexed_files == 0, "prose-yielding files are not code and are excluded" 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_prose_file_is_not_counted_as_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_prose_file_is_not_counted_as_barren · 3 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.