test_an_unknown_option_is_refused_by_name

Tests › tests/test_buildoptions.py

passed Passed in the packaged run.

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

  1. —
→

When

  1. bo.apply_options(_args(), {"lock_patterns": "locks.yaml"}, Path("/repo"))
→

Then

  1. ✓ raises bo.BuildOptionError
  2. ✓ str(caught.value) contains "lock_patterns"
  3. ✓ str(caught.value) contains "locks"

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

What it checks (2)

  1. assert "lock_patterns" in str(caught.value) not attributed
  2. assert "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→_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