test_check_names_every_missing_import¶
Tests › tests/test_wiki_imports.py
What this test is for
Why it exists
A GLOB THAT MATCHES NOTHING is a problem: a misspelled gcov or feature glob would otherwise yield a trace that reads as "no coverage measured" or "no scenarios".
Verifies REQ-DDB-WIKI-009 REQ-DDB-WIKI-016
Given
(tmp_path / "map.yaml").write_text("R-A: [x]\nR-NOPE: [y]\n")(tmp_path / ".clew.yaml").write_text( "wiki:\n docs: []\ntests:\n" " results: [{format: tap, path: missing.tap}, {format: nunit, path: n.xml}]\n" " gcov: ['build/*.gcov']\n features: ['features/*.feature']\n" " mapping: map.yaml\n" )
When
problems = "\n".join(check_wiki(tmp_path, traced))
Then
- ✓ problems contains "'missing.tap' does not exist"
- ✓ problems contains "'nunit' is not known"
- ✓ problems contains "'build/*.gcov' matches no file"
- ✓ problems contains "'features/*.feature' matches no file"
- ✓ problems contains "R-NOPE"
- ✓ problems.replace("R-A:", "") does not contain "R-A"
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 · 39 of 400 steps
… 6 steps between
… 74 steps between
… 264 later steps
tests/test_wiki_imports.py:324 · its file's page
What it checks (5)
assert "'missing.tap' does not exist" in problemsobservescheck_wikiviaproblemsassert "'nunit' is not known" in problemsobservescheck_wikiviaproblemsassert "'build/*.gcov' matches no file" in problemsobservescheck_wikiviaproblemsassert "'features/*.feature' matches no file" in problemsobservescheck_wikiviaproblemsassert "R-NOPE" in problems and "R-A" not in problems.replace("R-A:", "")observescheck_wikiviaproblems
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.
and 6 more requirement paths, listed below.
Requirements it verifies (2)
| requirement | linked by | implementers exercised |
|---|---|---|
| REQ-DDB-WIKI-009 | catalog | unknown |
| REQ-DDB-WIKI-016 | catalog | unknown |
Also reaches 18 requirements
Its run touches their code; that is reach, not proof.
- REQ-DDB-CONFIG-001 inferred
- REQ-DDB-CONFIG-003 inferred
- REQ-DDB-GUARD-012 measured
- REQ-DDB-GUARD-024 inferred
- REQ-DDB-GUARD-027 inferred
- REQ-DDB-QUERY-001 measured
- REQ-DDB-QUERY-003 measured
- REQ-DDB-QUERY-010 inferred
- REQ-DDB-SCHEMA-006 inferred
- REQ-DDB-SCHEMA-015 inferred
- REQ-DDB-WIKI-003 measured
- REQ-DDB-WIKI-004 measured
- REQ-DDB-WIKI-005 measured
- REQ-DDB-WIKI-006 inferred
- REQ-DDB-WIKI-010 measured
- REQ-DDB-WIKI-015 inferred
- REQ-DDB-WIKI-040 inferred
- REQ-DDB-WIKI-054 inferred