test_a_docstring_already_in_the_body_is_served_once¶
Tests › tests/test_compact_wire.py
What this test is for
Why it exists
1.3.9. A Python docstring sits INSIDE the body excerpt, and doxygen serves the same text again as `detail` — measured at 14.7% of this repository's dossier bytes. In the compact shape `detail` is dropped when the body already carries it, and `detail_in_body: true` says so, so an absent `detail` is never read as "undocumented".
Given
payload = { "brief": "Fetch the widget.", "detail": _DOC, "body": {"lines": ["def fetch(id):", f' """{_DOC}"""', " return cache[id]"]}, }
When
out = compact_docs(copy.deepcopy(payload))
Then
- ✓ out does not contain "detail"
- ✓ out["detail_in_body"] is True
- ✓ out["brief"] equals payload["brief"]
What it exercises
The parts of the system's flows this test ran, measured by per-test coverage: lit steps ran in this test, dimmed ones did not, and ▶ marks where the test called in. Each title opens the whole flow with these steps lit.
Look up one name: everything the index holds about it · 1 of 226 steps
… 102 earlier steps
… 119 later steps
tests/test_compact_wire.py:177 · its file's page
What it checks (2)
assert "detail" not in out and out["detail_in_body"] is Trueobservescompact_docsviaoutassert out["brief"] == payload["brief"]observescompact_docsviaout
Where the product reaches it
dossier→_wire_shape→compact_docs(flow)
Call flow
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.
Also reaches 1 requirement
Its run touches their code; that is reach, not proof.
- REQ-DDB-QUERY-014 measured