test_the_benign_entropic_case_does_NOT_warn

Tests › tests/test_coverage.py

passed Passed in the packaged run.

What this test is for

Why it exists

THE FALSE-ALARM GUARD, and it is the reason the threshold is a ratio.

Given

  1. files = _healthy(170) + [ (f"vendor/Fuzzer/FuzzerUtil{platform}.cpp", 200, 0) for platform in ("Windows", "Darwin", "Posix", "IOWindows", "Merge", "Main", "Extra") ]
  2. db_path, root = _coverage_db(tmp_path, files)
→

When

  1. with caplog.at_level(logging.WARNING): coverage = report_index_coverage(db_path, root)
→

Then

  1. ✓ coverage.substantive_files equals 177
  2. ✓ coverage.barren_files equals 7
  3. ✓ round(coverage.barren_ratio, 3) equals 0.04
  4. ✓ coverage.alarming is false
  5. ✓ [r for r in caplog.records if r.levelno >= logging.WARNING] is false

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

What it checks (5)

  1. assert coverage.substantive_files == 177 observes report_index_coverage via coverage
  2. assert coverage.barren_files == 7 observes report_index_coverage via coverage
  3. assert round(coverage.barren_ratio, 3) == 0.04 observes report_index_coverage via coverage
  4. assert not coverage.alarming observes report_index_coverage via coverage
  5. assert not [r for r in caplog.records if r.levelno >= logging.WARNING], ( "entropic's inapplicable platform files are not a defect and must not warn" ) not attributed

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_the_benign_entropic_case_does_NOT_warn→_healthy→_coverage_db→report_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_the_benign_entropic_case_does_NOT_warn · 5 checksreport_index_coveragewarn_if_no_function_bodiesREQ-DDB-INDEX-001 · measuredreport_index_coveragemeasure_index_coverage_file_yieldsmemoizedREQ-DDB-INDEX-002 · measuredreport_index_coverageREQ-DDB-INDEX-003 · measured
Also reaches 4 requirements

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