test_render_doc_matches_doxygen_shapes_and_escapes

Tests › tests/test_jsts.py

passed Passed in the packaged run.

What this test is for

Why it exists

The test says nothing about why.

Given

  1. raw = ( "/**\n * Formats strings.\n *\n * Handles a Map<string, number> & friends.\n" " * @version 3\n * @req REQ-JS-001\n */" )
→

When

  1. brief, detail = render_doc(raw)
  2. from clew.query._common import extract_version, strip_xml
  3. extract_version(detail)
  4. strip_xml(detail)
→

Then

  1. ✓ brief equals "<para>Formats strings.</para>"
  2. ✓ detail contains "<para>Handles a Map&lt;string, number&gt; &amp; friends.</para>"
  3. ✓ detail contains '<simplesect kind="version"><para>3</para>'
  4. ✓ detail contains "<para>@req REQ-JS-001</para>"
  5. ✓ extract_version(detail) equals "3"
  6. ✓ 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

program launcherprogram launcherprogram launcherprogram launcherclew/guard/main.pyclew/guard/main.pyclew/guard/main.pyclew/guard/main.pyclew/guard/config.pyclew/guard/config.pyclew/guard/config.pyclew/guard/config.pyclew/guard/checks.pyclew/guard/checks.pyclew/guard/checks.pyclew/guard/checks.pyother filesother filesother filesother filesopt (line 1198)optloop (line 143)looploop (line 146)loopopt (line 1171)optloop (line 181)loopmain163. _extract_file_block_text → _docstring_block163_docstring_block164. _check_file_block_tags → parse_doxygen_tags164parse_doxygen_tags165. parse_doxygen_tags → _mask_escaped_at165_mask_escaped_at▶ test enters166–170. parse_doxygen_tags → _split_inline_tags166_split_inline_tags +4 more171. _check_file_block_tags → apply_autobrief171apply_autobrief172. apply_autobrief → _mask_escaped_at172_mask_escaped_at▶ test enters173–174. apply_autobrief → _split_inline_tags173_split_inline_tags +1 more175. validate_file → check_presence175check_presence176. check_presence → get_validate176get_validate

… 181 later steps

tests/test_jsts.py:152 · its file's page

What it checks (6)

  1. assert brief == "<para>Formats strings.</para>" not attributed
  2. assert "<para>Handles a Map&lt;string, number&gt; &amp; friends.</para>" in detail not attributed
  3. assert '<simplesect kind="version"><para>3</para>' in detail not attributed
  4. assert "<para>@req REQ-JS-001</para>" in detail not attributed
  5. assert extract_version(detail) == "3" observes extract_version
  6. assert "Map<string, number> & friends" in strip_xml(detail), "escaped text survives, decoded" observes strip_xml

Where the product reaches it

  • build_wiki → _build_site → test_pages → _briefs → strip_xml (flow)

Call flow

test_render_doc_matches_doxygen_shapes_and_escapes→render_doc→extract_version→strip_xml

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_render_doc_matches_doxygen_shapes_and_escapes · 6 checksrender_docparse_doxygen_tagsREQ-DDB-GUARD-019 · measuredrender_docapply_autobriefREQ-DDB-GUARD-024 · measuredrender_docREQ-DDB-PIPE-012 · measuredstrip_xmlREQ-DDB-QUERY-003 · measured
Also reaches 4 requirements

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