test_a_declared_root_beats_convention¶
Tests › tests/test_kconfig.py
What this test is for
Why it exists
CLI flag > declaration > convention is the precedence every other discovery here follows. The declared file is deliberately NOT at the root, so a pass cannot be explained by the root fallback.
Verifies REQ-DDB-PIPE-007 REQ-DDB-QUERY-006
Given
(repo / "conf").mkdir()(repo / "conf" / KCONFIG_NAME).write_text("config DECLARED_ONLY\n\tbool\n", encoding="utf-8")
When
location = discover_kconfig(repo, {SECTION_KCONFIG: {KEY_ROOT: "conf/Kconfig"}})
Then
- ✓ location.source equals SOURCE_DECLARED
- ✓ location.path equals Path("conf/Kconfig")
tests/test_kconfig.py:162 · its file's page
What it checks (2)
assert location.source == SOURCE_DECLAREDobservesdiscover_kconfigvialocationassert location.path == Path("conf/Kconfig")observesdiscover_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 (2)
| requirement | linked by | implementers exercised |
|---|---|---|
| REQ-DDB-PIPE-007 | catalog | unknown |
| REQ-DDB-QUERY-006 | catalog | unknown |
Also reaches 2 requirements
Its run touches their code; that is reach, not proof.
- REQ-DDB-CONFIG-005 measured
- REQ-DDB-PIPE-014 measured