test_gcov_text_reads_hits_and_skips_non_executable_lines¶
Tests › tests/test_wiki_imports.py
What this test is for
Why it exists
`#####` and `=====` are executable lines with no hits; `-` is not executable at all, so it is not a line with zero hits.
Verifies REQ-DDB-WIKI-010 REQ-DDB-WIKI-016
Given
(tmp_path / "src").mkdir()(tmp_path / "src" / "a.c").write_text("x\n")
3 more
report = tmp_path / "build" / "a.c.gcov"report.parent.mkdir()report.write_text(_GCOV)
When
parse_gcov([report], tmp_path)
Then
- ✓ parse_gcov([report], tmp_path) equals {"src/a.c": {10: 5, 11: 0, 12: 2, 13: 0}}
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.
Build this wiki from the index · 1 of 400 steps
… 131 earlier steps
… 264 later steps
tests/test_wiki_imports.py:48 · its file's page
What it checks (1)
assert parse_gcov([report], tmp_path) == {"src/a.c": {10: 5, 11: 0, 12: 2, 13: 0}}observesparse_gcov
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
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.
Requirements it verifies (2)
| requirement | linked by | implementers exercised |
|---|---|---|
| REQ-DDB-WIKI-010 | catalog | unknown |
| REQ-DDB-WIKI-016 | catalog | unknown |
Also reaches 1 requirement
Its run touches their code; that is reach, not proof.
- REQ-DDB-WIKI-009 measured