test_every_accepted_option_can_actually_be_applied

Tests › tests/test_buildoptions.py

passed Passed in the packaged run.

What this test is for

Why it exists

A key listed as accepted and then unhandled would raise "unknown" for a name this module itself advertises — the contradiction a reader has no way to diagnose. Driving the whole advertised set through the real function is the only check that cannot disagree with the advertisement.

Verifies REQ-DDB-CONFIG-008

Given

  1. values: dict[str, object] = {name: ["X"] for name in bo.INLINE_LIST_OPTIONS}
  2. values["event_tags"] = {"emits": "producer"}
2 more
  1. for key in (*bo.PATH_OPTIONS, *bo.MANIFEST_OPTIONS): values[key] = f"{key}.yaml"
  2. for key in bo.SECTION_DOCUMENT_OPTIONS: values[key] = {"predefined": ["X"]} if key == "preprocessor" else {"path": "Kconfig"}
→

When

  1. list(bo.accepted_options())
  2. bo.accepted_options()
  3. repo_root = tmp_path
3 more
  1. for key in bo.PATH_OPTIONS_MUST_EXIST: (repo_root / f"{key}.yaml").write_text("", encoding="utf-8")
  2. args = _args()
  3. bo.apply_options(args, values, repo_root)
→

Then

  1. ✓ sorted(values) equals list(bo.accepted_options())
  2. ✓ bo.apply_options(args, values, repo_root) equals list(bo.accepted_options())

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

What it checks (2)

  1. assert sorted(values) == list(bo.accepted_options()), "the advertised set must be complete" observes list
  2. assert bo.apply_options(args, values, repo_root) == list(bo.accepted_options()) observes apply_options

Where the product reaches it

  • dossier → subject_payload → _flatten_subject → list (flow)

Call flow

test_every_accepted_option_can_actually_be_applied→list→accepted_options→_args→apply_options

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