test_an_empty_stated_document_falls_back_to_the_declaration

Tests › tests/test_buildoptions.py

passed Passed in the packaged run.

What this test is for

Why it exists

The absent/empty/replaces convention `--exclude` and `--entry-patterns` keep, at the per-option level. `{}` is falsy, so `cli._declared_or_flag` falls through to the target's own declaration — which is the only way to undo a statement without deleting anything.

Verifies REQ-DDB-CONFIG-008

Given

  1. declared = {"writers": [{"name_prefix": "FROM_DECL_"}]}
  2. decl = {SECTION_SHARED_KEY: declared}
  3. args = _args()
→

When

  1. bo.apply_options(args, {"shared_key_patterns": {}}, Path("/repo"))
  2. _declared_or_flag(args.shared_key_patterns, decl, SECTION_SHARED_KEY)
→

Then

  1. ✓ _declared_or_flag(args.shared_key_patterns, decl, SECTION_SHARED_KEY) equals declared

What it exercises

The parts of the system's flows this test ran, measured by per-test coverage: lit steps ran in this test, dimmed ones did not, and ▶ marks where the test called in. Each title opens the whole flow with these steps lit.

thread `clew-first-build-` — `_first_build_worker` (clew/mcp_server/server.py) · 1 of 142 steps

… 123 earlier steps

thread startthread startthread startthread startclew/declaration.pyclew/declaration.pyclew/declaration.pyclew/declaration.pyother filesother filesother filesother filesopt (line 547)opttry (line 548)tryloop (line 598)looploop (line 648)loop_first_build_worker124. _checked_section → check_manifest_document124check_manifest_document125. check_manifest_document → _checked_document125_checked_document126. _checked_document → _checked_entries126_checked_entries▶ test enters127. _checked_entries → _checked_entry127_checked_entry128. _checked_section → _check_section_keys128_check_section_keys

… 14 later steps

2 more

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

What it checks (1)

  1. assert _declared_or_flag(args.shared_key_patterns, decl, SECTION_SHARED_KEY) == declared observes _declared_or_flag

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_empty_stated_document_falls_back_to_the_declaration→_args→apply_options→_declared_or_flag

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
Also reaches 1 requirement

Its run touches their code; that is reach, not proof.