test_an_unstated_scope_keeps_the_parsers_default

Tests › tests/test_build_docs_db.py

passed Passed in the packaged run.

What this test is for

Why it exists

THE EMBEDDING ENTRY POINT CONTRADICTED ITS OWN DOCSTRING. `build_index` says "defaults are sourced by parsing rather than restated here, so a flag added to `_build_argparser` reaches this path with its intended default" — and then `scope` alone restated one, with the OPPOSITE value: signature `SCOPE_DOXYFILE`, parser `SCOPE_FROM_GUARD`.

Verifies REQ-DDB-PIPE-001 REQ-DDB-PIPE-010

Given

  1. seen: list[str] = []
  2. monkeypatch.setattr(cli, "_run_pipeline", lambda args: seen.append(args.scope))
→

When

  1. cli.build_index(output="/tmp/unused.db")
  2. cli.build_index(output="/tmp/unused.db", scope=SCOPE_DOXYFILE)
→

Then

  1. ✓ seen equals [SCOPE_FROM_GUARD]
  2. ✓ seen[-1] equals SCOPE_DOXYFILE

tests/test_build_docs_db.py:2258 · its file's page

What it checks (2)

  1. assert seen == [SCOPE_FROM_GUARD], "an unstated scope must be the parser's default" not attributed
  2. assert seen[-1] == SCOPE_DOXYFILE 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_unstated_scope_keeps_the_parsers_default→build_index

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_an_unstated_scope_keeps_the_parsers_default · 2 checksbuild_index_run_pipeline_run_pipeline_innerreport_statsREQ-DDB-CLI-001 · inferredbuild_index… 7 calls …doxygen_supports_sqlite3REQ-DDB-CLI-002 · inferredbuild_indexnormalize_scopeREQ-DDB-CONFIG-001 · measuredbuild_index… 4 calls …_is_flat_req_listREQ-DDB-CONFIG-003 · inferredbuild_index… 3 calls …resolve_preprocessorREQ-DDB-CONFIG-004 · inferredbuild_index… 3 calls …import_kconfigREQ-DDB-CONFIG-005 · inferredbuild_index… 3 calls …recorded_explicitREQ-DDB-CONFIG-006 · inferredbuild_index… 3 calls …write_build_signatureREQ-DDB-CONFIG-007 · inferredbuild_index… 3 calls …load_toolchain_configREQ-DDB-CONFIG-009 · inferredbuild_index… 5 calls …read_requirements_sectionREQ-DDB-GUARD-012 · inferredbuild_index… 5 calls …parse_doxygen_tagsREQ-DDB-GUARD-019 · inferredbuild_index… 5 calls …apply_autobriefREQ-DDB-GUARD-024 · inferred

and 42 more requirement paths, listed below.

Requirements it verifies (2)

requirementlinked byimplementers exercised
REQ-DDB-PIPE-001catalog3 of 5: _candidate_docs, enrich_database, ingest_supplementary_docs
REQ-DDB-PIPE-010catalog2 of 2: _build_inferred_edges, _log_suppressed_keys
Also reaches 52 requirements

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