test_explicit_flag_wins_over_the_declaration¶
Tests › tests/test_declaration.py
What this test is for
Why it exists
The file is the repo's standing statement; a flag is a deliberate one-off override, so the flag takes precedence.
Given
decl = {SECTION_SHARED_KEY: {"writers": [{"name_prefix": "FROM_DECL_"}]}}explicit = tmp_path / "patterns.yaml"explicit.write_text("writers: []\n", encoding="utf-8")
When
_declared_or_flag(str(explicit), decl, SECTION_SHARED_KEY)_declared_or_flag(None, decl, SECTION_SHARED_KEY)_declared_or_flag(None, {}, SECTION_SHARED_KEY)
Then
- ✓ _declared_or_flag(str(explicit), decl, SECTION_SHARED_KEY) equals explicit.resolve()
- ✓ _declared_or_flag(None, decl, SECTION_SHARED_KEY) equals decl[SECTION_SHARED_KEY]
- ✓ _declared_or_flag(None, {}, SECTION_SHARED_KEY) is None
tests/test_declaration.py:105 · its file's page
What it checks (3)
assert _declared_or_flag(str(explicit), decl, SECTION_SHARED_KEY) == explicit.resolve()observes_declared_or_flagassert _declared_or_flag(None, decl, SECTION_SHARED_KEY) == decl[SECTION_SHARED_KEY]observes_declared_or_flagassert _declared_or_flag(None, {}, SECTION_SHARED_KEY) is Noneobserves_declared_or_flag
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
test_explicit_flag_wins_over_the_declaration→_declared_or_flagWhat 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.
Also reaches 1 requirement
Its run touches their code; that is reach, not proof.
- REQ-DDB-CONFIG-001 measured