test_auto_discovery_refuses_two_candidates

Tests › tests/test_preprocessor.py

passed Passed in the packaged run.

What this test is for

Why it exists

Follows `discover_doxyfile`, and the stakes here are higher than there. Choosing the wrong config header does not merely index the wrong FILES — it indexes a different VARIANT of the right ones, and every count taken from the result still looks legitimate.

Verifies REQ-DDB-PIPE-014

Given

  1. root = tmp_path / "repo"
  2. root.mkdir()
2 more
  1. (root / "autoconf.h").write_text("#define FROM_AUTOCONF 1\n", encoding="utf-8")
  2. (root / "config.h").write_text("#define FROM_CONFIG 1\n", encoding="utf-8")
→

When

  1. config = resolve_preprocessor( root, {SECTION_PREPROCESSOR: {"config_header": CONFIG_HEADER_AUTO}} )
→

Then

  1. ✓ config.macros equals ()
  2. ✓ config.declared holds
  3. ✓ config.searched holds

tests/test_preprocessor.py:528 · its file's page

What it checks (3)

  1. assert config.macros == (), "discovery guessed among two candidates" observes resolve_preprocessor via config
  2. assert config.declared, "a refusal must still record that a configuration was declared" observes resolve_preprocessor via config
  3. assert config.searched, "a refusal must name where it looked" observes resolve_preprocessor via config

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_auto_discovery_refuses_two_candidates→resolve_preprocessor

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.

test_auto_discovery_refuses_two_candidates · 3 checksresolve_preprocessorREQ-DDB-CONFIG-004 · measuredresolve_preprocessor_resolve_config_header_named_config_headerwithin_repoREQ-DDB-PIPE-014 · catalog

Requirements it verifies (1)

requirementlinked byimplementers exercised
REQ-DDB-PIPE-014catalog1 of 5: within_repo
Also reaches 1 requirement

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