test_wiki_check_prints_ears_notes_without_failing_on_them

Tests › tests/test_wiki_site.py

passed Passed in the packaged run.

What this test is for

Why it exists

S9: never a gate. `clew wiki check` prints a note for each requirement in no EARS pattern, on stderr, and its exit code is exactly what the problems alone decide.

Verifies REQ-DDB-WIKI-011 REQ-DDB-WIKI-012 REQ-DDB-WIKI-013 REQ-DDB-WIKI-014 REQ-DDB-WIKI-015 REQ-DDB-WIKI-018 REQ-DDB-WIKI-020 REQ-DDB-WIKI-021 REQ-DDB-WIKI-022 REQ-DDB-WIKI-023 REQ-DDB-WIKI-025 REQ-DDB-WIKI-031 REQ-DDB-WIKI-044 REQ-DDB-WIKI-050 REQ-DDB-WIKI-052

Given

  1. root, db = repo
→

When

  1. rc = wiki_main(["check", "--repo-root", str(root), "--index", str(db)])
  2. out, err = capsys.readouterr()
  3. check_wiki(root, db)
→

Then

  1. ✓ err contains "note: REQ-W-001 is in no EARS pattern:"
  2. ✓ out does not contain "note:"
  3. ✓ rc equals 1 if check_wiki(root, db) else 0

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 · 46 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–9. read_requirements_section → _validate_node8_validate_node +1 more

… 6 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)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–37. load_wiki_config → _strings26_strings +11 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

… 111 steps between

callercallercallercallerclew/query/_common.pyclew/query/_common.pyclew/query/_common.pyclew/query/_common.pyother filesother filesother filesother filesopt (line 201)optbuild_wiki169. derive_flow → _entry_rowids169_entry_rowids170. _entry_rowids → identity_rowids170identity_rowids171. identity_rowids → function_candidates171function_candidates▶ test enters172–175. function_candidates → table_exists172table_exists +3 more176–177. matching_identity → qualified_name_of176qualified_name_of +1 more

… 2 steps between

callercallercallercallerclew/query/_common.pyclew/query/_common.pyclew/query/_common.pyclew/query/_common.pyother filesother filesother filesother filesopt (line 777)optalt (line 780)altopt (line 203)optbuild_wiki180–181. identity_rowids → qualified_name_of180qualified_name_of +1 more182. identity_rowids → qualified_name_of182qualified_name_of▶ test enters183. identity_rowids → qualified_name_of183qualified_name_of184. _entry_rowids → function_candidates184function_candidates185. _entry_rowids → qualified_name_of185qualified_name_of

… 215 later steps

1 more

tests/test_wiki_site.py:988 · its file's page

What it checks (3)

  1. assert "note: REQ-W-001 is in no EARS pattern:" in err not attributed
  2. assert "note:" not in out, "notes are not problems" not attributed
  3. assert rc == (1 if check_wiki(root, db) else 0) observes check_wiki

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_wiki_check_prints_ears_notes_without_failing_on_them→wiki_main→check_wiki

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_wiki_check_prints_ears_notes_without_failing_on_them · 3 checkswiki_main… 3 calls …report_statsREQ-DDB-CLI-001 · inferredwiki_main… 8 calls …doxygen_supports_sqlite3REQ-DDB-CLI-002 · inferredcheck_wiki… 3 calls …git_argvREQ-DDB-CONFIG-001 · inferredcheck_wiki… 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 · inferredcheck_wikiload_wiki_config_requirements_sectionread_requirements_sectionREQ-DDB-GUARD-012 · measuredwiki_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 (15)

requirementlinked byimplementers exercised
REQ-DDB-WIKI-011catalog1 of 1: sphinx_settings
REQ-DDB-WIKI-012catalog6 of 6: charts_block, donut, group_of, group_table and 2 more
REQ-DDB-WIKI-013catalog3 of 3: burndown, roadmap_milestones, series
REQ-DDB-WIKI-014catalog2 of 2: flow_page, step_data
REQ-DDB-WIKI-015catalog2 of 3: declared_catalog, impact_path
REQ-DDB-WIKI-018catalog1 of 1: entry_point_flows
REQ-DDB-WIKI-020catalog2 of 2: modal, modal_template
REQ-DDB-WIKI-021catalog3 of 3: minimap_html, web_html, web_page
REQ-DDB-WIKI-022catalog16 of 21: _evidence_line, _index_requirements, _summary_svg, _what and 12 more
REQ-DDB-WIKI-023catalog1 of 1: flows_index
REQ-DDB-WIKI-025catalog4 of 6: commit_published, page_for, symbol_href, symbol_pages
REQ-DDB-WIKI-031catalog4 of 5: decisions_page, doc_kind, find_decisions, parse_adr
REQ-DDB-WIKI-044catalogunknown
REQ-DDB-WIKI-050catalog1 of 1: flow_page
REQ-DDB-WIKI-052catalog1 of 1: tests_index
Also reaches 88 requirements

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