test_a_derived_option_is_refused_with_its_reason

Tests › tests/test_buildoptions.py

passed Passed in the packaged run.

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

  1. —
→

When

  1. bo.apply_options(_args(), {"key_alias_prefixes": ["DM_KEY_"]}, Path("/repo"))
  2. message = str(caught.value)
→

Then

  1. ✓ raises bo.BuildOptionError
  2. ✓ message contains "cannot be stated"
  3. ✓ message contains "shared_key_patterns"
  4. ✓ message does not contain "unknown"

tests/test_buildoptions.py:107 · its file's page

What it checks (3)

  1. assert "cannot be stated" in message not attributed
  2. assert "shared_key_patterns" in message, "say what to state instead" not attributed
  3. assert "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→_args

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 (1)

requirementlinked byimplementers exercised
REQ-DDB-CONFIG-008catalogunknown