test_locations_are_repo_relative_and_point_at_the_declaring_file¶
Tests › tests/test_kconfig.py
What this test is for
Why it exists
A symbol declared in a `source`d file must report THAT file, not the top-level one — otherwise `file:line` cannot be opened. And repo-relative, always.
Verifies REQ-DDB-PIPE-007 REQ-DDB-QUERY-006
Given
- —
When
model = load_kconfig(discover_kconfig(repo), repo)beta = next(s for s in model.symbols if s.name == "WIDGET_MOTOR_BETA")
Then
- ✓ beta.file_path equals "Kconfig.motor"
- ✓ Path(beta.file_path).is_absolute() is false
- ✓ beta.line is greater than 0
tests/test_kconfig.py:232 · its file's page
What it checks (3)
assert beta.file_path == "Kconfig.motor"not attributedassert not Path(beta.file_path).is_absolute()not attributedassert beta.line > 0not attributed
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