test_a_one_line_docstring_is_one_block

Tests › tests/guard/test_guard_python_file_docstring.py

passed Passed in the packaged run.

What this test is for

Why it exists

Opened and closed on one line.

Given

  1. source = '"""@file x.py @brief Does x. @version 1"""\nimport os\n'
→

When

  1. check_file_presence("x.py", source, _CONFIG)
→

Then

  1. ✓ check_file_presence("x.py", source, _CONFIG) equals []

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) · 11 of 357 steps

… 154 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 227)opttry (line 241)tryopt (line 1133)optloop (line 143)looploop (line 146)loopelif (line 153)elifopt (line 1171)optloop (line 181)loopmain155. validate_file → unconfigured_language155unconfigured_language156. validate_file → check_file_presence156check_file_presence157. check_file_presence → get_validate157get_validate▶ test enters158. check_file_presence → _find_file_doxygen_start158_find_file_doxygen_start159–160. check_file_presence → _first_code_line159_first_code_line +1 more161–163. check_file_presence → _check_file_block_tags161_check_file_block_tags +2 more164. _check_file_block_tags → parse_doxygen_tags164parse_doxygen_tags165–168. parse_doxygen_tags → _mask_escaped_at165_mask_escaped_at +3 more169. parse_doxygen_tags → _finalize_tag169_finalize_tag170. parse_doxygen_tags → _finalize_tag170_finalize_tag171. _check_file_block_tags → apply_autobrief171apply_autobrief172. apply_autobrief → _mask_escaped_at172_mask_escaped_at

… 185 later steps

tests/guard/test_guard_python_file_docstring.py:41 · its file's page

What it checks (1)

  1. assert check_file_presence("x.py", source, _CONFIG) == [] observes check_file_presence

Where the product reaches it

  • main → _run → run_precommit → _validate_files → validate_file → check_file_presence (flow)

Call flow

test_a_one_line_docstring_is_one_block→check_file_presence

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_one_line_docstring_is_one_block · 1 checkscheck_file_presenceREQ-DDB-GUARD-006 · measuredcheck_file_presence_check_file_block_tagsparse_doxygen_tagsREQ-DDB-GUARD-019 · measuredcheck_file_presence_check_file_block_tagsapply_autobriefREQ-DDB-GUARD-024 · inferred
Also reaches 3 requirements

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