test_a_capped_list_still_reports_the_true_count

Tests › tests/test_diagnostics.py

passed Passed in the packaged run.

What this test is for

Why it exists

A cap that cannot be seen is how a bounded answer comes to read as a complete one. The count is the claim and stays exact, so `count > len(named)` makes the truncation visible without a second field.

Given

  1. rows = [ ("function", f"Fam{fam}_Set_{key}") for fam in range(dg.MAX_NAMED + 3) for key in ("A", "B", "C", "D") ]
  2. db = _corpus(tmp_path / "clew.db", rows)
→

When

  1. meta = dg.collect(db, tmp_path / "absent.Doxyfile", None, None, None).as_meta()
→

Then

  1. ✓ meta["accessor_families_count"] equals str(dg.MAX_NAMED + 3)
  2. ✓ meta["accessor_families"].count("keys)") equals dg.MAX_NAMED

tests/test_diagnostics.py:309 · its file's page

What it checks (2)

  1. assert meta["accessor_families_count"] == str(dg.MAX_NAMED + 3) observes collect via meta
  2. assert meta["accessor_families"].count("keys)") == dg.MAX_NAMED observes collect via meta

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_capped_list_still_reports_the_true_count→_corpus→collect

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_capped_list_still_reports_the_true_count · 2 checkscollectresolve_shared_key_patternsREQ-DDB-CONFIG-006 · measuredcollectREQ-DDB-CONFIG-007 · measuredcollectload_thread_patternsREQ-DDB-SCHEMA-001 · measuredcollectresolve_shared_key_patternsREQ-DDB-SCHEMA-005 · measuredcollectload_lock_patternsREQ-DDB-SCHEMA-011 · measuredcollectload_lock_patternsdeclaration_originREQ-DDB-SCHEMA-012 · measured
Also reaches 7 requirements

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