test_render_doc_matches_doxygen_shapes_and_escapes¶
Tests › tests/test_jsts.py
What this test is for
Why it exists
The test says nothing about why.
Given
raw = ( "/**\n * Formats strings.\n *\n * Handles a Map<string, number> & friends.\n" " * @version 3\n * @req REQ-JS-001\n */" )
When
brief, detail = render_doc(raw)from clew.query._common import extract_version, strip_xmlextract_version(detail)strip_xml(detail)
Then
- ✓ brief equals "<para>Formats strings.</para>"
- ✓ detail contains "<para>Handles a Map<string, number> & friends.</para>"
- ✓ detail contains '<simplesect kind="version"><para>3</para>'
- ✓ detail contains "<para>@req REQ-JS-001</para>"
- ✓ extract_version(detail) equals "3"
- ✓ strip_xml(detail) contains "Map<string, number> & friends"
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.
`main` (clew/guard/main.py) · 9 of 357 steps
… 162 earlier steps
… 181 later steps
tests/test_jsts.py:152 · its file's page
What it checks (6)
assert brief == "<para>Formats strings.</para>"not attributedassert "<para>Handles a Map<string, number> & friends.</para>" in detailnot attributedassert '<simplesect kind="version"><para>3</para>' in detailnot attributedassert "<para>@req REQ-JS-001</para>" in detailnot attributedassert extract_version(detail) == "3"observesextract_versionassert "Map<string, number> & friends" in strip_xml(detail), "escaped text survives, decoded"observesstrip_xml
Where the product reaches it
build_wiki→_build_site→test_pages→_briefs→strip_xml(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 4 requirements
Its run touches their code; that is reach, not proof.
- REQ-DDB-GUARD-019 measured
- REQ-DDB-GUARD-024 measured
- REQ-DDB-PIPE-012 measured
- REQ-DDB-QUERY-003 measured