test_convention_refuses_among_several_candidates¶
Tests › tests/test_kconfig.py
What this test is for
Why it exists
`discover_doxyfile` was once caught selecting a TEST FIXTURE's Doxyfile to index a whole project by resolving strays alphabetically. Here the wrong choice describes a configuration space the repo does not ship, and every count taken from it looks legitimate — so ambiguity refuses.
Verifies REQ-DDB-PIPE-007 REQ-DDB-PIPE-014 REQ-DDB-QUERY-006
Given
root = tmp_path / "ambiguous"for directory in ("app", "src"): (root / directory).mkdir(parents=True) (root / directory / KCONFIG_NAME).write_text("config A\n\tbool\n", encoding="utf-8")
When
location = discover_kconfig(root)
Then
- ✓ location.path is None
- ✓ len(location.searched) is greater than 1
tests/test_kconfig.py:136 · its file's page
What it checks (2)
assert location.path is None, "two conventional candidates must not be resolved by order"observesdiscover_kconfigvialocationassert len(location.searched) > 1observesdiscover_kconfigvialocation
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 (3)
| requirement | linked by | implementers exercised |
|---|---|---|
| REQ-DDB-PIPE-007 | catalog | unknown |
| REQ-DDB-PIPE-014 | catalog | 1 of 5: within_repo |
| REQ-DDB-QUERY-006 | catalog | unknown |
Also reaches 1 requirement
Its run touches their code; that is reach, not proof.
- REQ-DDB-CONFIG-005 measured