test_the_cli_creates_the_output_directory

Tests › tests/test_wiki_tracerun.py

passed Passed in the packaged run.

What this test is for

Why it exists

FOUND WIRING trace-run into CI (2.1): `--out build/traces/dossier.json` on a fresh checkout crashed with a FileNotFoundError traceback, because nothing creates `build/traces/`.

Verifies REQ-DDB-WIKI-036 REQ-DDB-WIKI-049

Given

  1. out = tmp_path / "build" / "traces" / "spans.json"
  2. args = ["trace-run", "--repo-root", str(repo), "--test", "tests/test_m.py::test_load"]
→

When

  1. wiki_main([*args, "--out", str(out)])
→

Then

  1. ✓ wiki_main([*args, "--out", str(out)]) equals 0
  2. ✓ json.loads(out.read_text())["resourceSpans"] holds

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.

Build this wiki from the index · 35 of 400 steps

callercallercallercallerclew/wiki/build.pyclew/wiki/build.pyclew/wiki/build.pyclew/wiki/build.pyclew/wiki/config.pyclew/wiki/config.pyclew/wiki/config.pyclew/wiki/config.pyother filesother filesother filesother filestry (line 708)trybuild_wiki1. build_wiki → load_wiki_config1load_wiki_config2. load_wiki_config → _read_section2_read_section▶ test enters3–6. load_wiki_config → _overlaid3_overlaid +3 more7. _requirements_section → read_requirements_section7read_requirements_section8. read_requirements_section → _validate_node8_validate_node

… 7 steps between

callercallercallercallercallerclew/wiki/build.pyclew/wiki/build.pyclew/wiki/build.pyclew/wiki/build.pyclew/wiki/build.pyclew/wiki/config.pyclew/wiki/config.pyclew/wiki/config.pyclew/wiki/config.pyclew/wiki/config.pyother filesother filesother filesother filesother filesloop (line 417)loopalt (line 421)altloop (line 135)looploop (line 632)looptry (line 752)tryloop (line 1312)loopopt (line 1314)optbuild_wiki16. list → link16link17. _validate_dict_node → _validate_node17_validate_node18. load_wiki_config → _top_level18_top_level▶ test enters19–21. load_wiki_config → _unknown19_unknown +2 more22. _strings → all22all23–25. all → _events23_events +2 more26–28. load_wiki_config → _strings26_strings +2 more29. _audiences → _unknown29_unknown30–37. load_wiki_config → _pinned_catalogs30_pinned_catalogs +7 more38. _declared_report → read_guard_section38read_guard_section39–41. load_wiki_config → _issues39_issues +2 more42. _sbom → all42all43–47. load_wiki_config → _one_of43_one_of +4 more48. _comments → all48all49–55. load_wiki_config → _doc_tags49_doc_tags +6 more56. build_wiki → report_limit56report_limit57. build_wiki → _build_site57_build_site

… 343 later steps

5 more

tests/test_wiki_tracerun.py:543 · its file's page

What it checks (2)

  1. assert wiki_main([*args, "--out", str(out)]) == 0 observes wiki_main
  2. assert json.loads(out.read_text())["resourceSpans"] 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_the_cli_creates_the_output_directory→wiki_main

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_the_cli_creates_the_output_directory · 2 checkswiki_main… 3 calls …report_statsREQ-DDB-CLI-001 · inferredwiki_main… 8 calls …doxygen_supports_sqlite3REQ-DDB-CLI-002 · inferredwiki_main… 4 calls …stated_document_metaREQ-DDB-CONFIG-001 · inferredwiki_main… 5 calls …_is_flat_req_listREQ-DDB-CONFIG-003 · inferredwiki_main… 4 calls …resolve_preprocessorREQ-DDB-CONFIG-004 · inferredwiki_main… 4 calls …import_kconfigREQ-DDB-CONFIG-005 · inferredwiki_main… 4 calls …recorded_explicitREQ-DDB-CONFIG-006 · inferredwiki_main… 4 calls …write_build_signatureREQ-DDB-CONFIG-007 · inferredwiki_main… 4 calls …load_toolchain_configREQ-DDB-CONFIG-009 · inferredwiki_main… 3 calls …read_requirements_sectionREQ-DDB-GUARD-012 · inferredwiki_main… 6 calls …parse_doxygen_tagsREQ-DDB-GUARD-019 · inferredwiki_main… 6 calls …apply_autobriefREQ-DDB-GUARD-024 · inferred

and 90 more requirement paths, listed below.

Requirements it verifies (2)

requirementlinked byimplementers exercised
REQ-DDB-WIKI-036catalog5 of 5: failure_of, imported_trace, load_traces, root_name and 1 more
REQ-DDB-WIKI-049catalog3 of 3: _step_values, redact_local_paths, with_values
Also reaches 100 requirements

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