test_a_derived_option_is_refused_with_its_reason¶
Tests › tests/test_buildoptions.py
What this test is for
Why it exists
`key_alias_prefixes` is resolved FROM the shared-key document plus the ecosystem defaults. Reporting it as "unknown" would send the reader hunting a typo in a key that is spelled correctly and simply is not theirs to set — this repo's recorded phantom-hunt shape, where a wrong label cost a real debugging detour.
Verifies REQ-DDB-CONFIG-008
Given
- —
When
bo.apply_options(_args(), {"key_alias_prefixes": ["DM_KEY_"]}, Path("/repo"))message = str(caught.value)
Then
- ✓ raises bo.BuildOptionError
- ✓ message contains "cannot be stated"
- ✓ message contains "shared_key_patterns"
- ✓ message does not contain "unknown"
tests/test_buildoptions.py:107 · its file's page
What it checks (3)
assert "cannot be stated" in messagenot attributedassert "shared_key_patterns" in message, "say what to state instead"not attributedassert "unknown" not in message, "a correctly-spelled key must not read as a typo"not 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
test_a_derived_option_is_refused_with_its_reason→apply_options→_argsWhat 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 (1)
| requirement | linked by | implementers exercised |
|---|---|---|
| REQ-DDB-CONFIG-008 | catalog | unknown |