test_a_declaration_still_beats_every_conventional_location¶
Tests › tests/test_build_docs_db.py
What this test is for
Why it exists
THE CONTROL on the precedence rule the resolver exists to hold: flag > declaration > convention > nothing. Adding a location extends the LAST tier only, so a declared catalog must still win even when a file sits at a conventional path — including the new one.
Verifies REQ-DDB-PIPE-001 REQ-DDB-PIPE-010
Given
declared = tmp_path / "spec" / "reqs.yaml"declared.parent.mkdir()
3 more
declared.write_text("requirements: {}\n", encoding="utf-8")for conventional in (tmp_path / "requirements.yaml", tmp_path / "docs" / "requirements.yaml"): conventional.parent.mkdir(exist_ok=True) conventional.write_text("requirements: {}\n", encoding="utf-8")cfg = {"requirements": {"file": "spec/reqs.yaml"}}
When
resolve_catalog_path(cfg, tmp_path)
Then
- ✓ resolve_catalog_path(cfg, tmp_path) equals declared.resolve()
tests/test_build_docs_db.py:2224 · its file's page
What it checks (1)
assert resolve_catalog_path(cfg, tmp_path) == declared.resolve()observesresolve_catalog_path
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-001 | catalog | unknown |
| REQ-DDB-PIPE-010 | catalog | unknown |
Also reaches 1 requirement
Its run touches their code; that is reach, not proof.
- REQ-DDB-SCHEMA-006 measured