test_an_unknown_option_is_refused_by_name¶
Tests › tests/test_buildoptions.py
What this test is for
Why it exists
Naming the accepted set in the message is the load-bearing half. "unknown option" alone leaves a caller guessing at a vocabulary they cannot see, and this surface exists precisely so an agent does not have to guess.
Verifies REQ-DDB-CONFIG-008
Given
- —
When
bo.apply_options(_args(), {"lock_patterns": "locks.yaml"}, Path("/repo"))
Then
- ✓ raises bo.BuildOptionError
- ✓ str(caught.value) contains "lock_patterns"
- ✓ str(caught.value) contains "locks"
tests/test_buildoptions.py:89 · its file's page
What it checks (2)
assert "lock_patterns" in str(caught.value)not attributedassert "locks" in str(caught.value), "the message must list the accepted keys"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_an_unknown_option_is_refused_by_name→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 |