test_shell_and_cmake_definitions_become_rows

Tests › tests/test_script_front_end.py

passed Passed in the packaged run.

What this test is for

Why it exists

The end-to-end path: registration, the shared harvest's dispatch, and the writer.

Given

  1. db, root = repo
→

When

  1. missing = substrate.missing_languages(("bash", "cmake"))
  2. if missing: pytest.skip(f"substrate lacks {missing}; clew requires lang-parsing-substrate>=0.12.0")
  3. register_paths(db, ["scripts/deploy.sh", "CMakeLists.txt", "config.yaml"])
2 more
  1. emit_definitions(db, root, None)
  2. members = _members(db)
→

Then

  1. ✓ members equals { "deploy": "function", "add_firmware": "function", "strict_warnings": "macro definition", }

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.

clew — `main` (clew/cli.py) · 9 of 400 steps

… 70 earlier steps

command-line usercommand-line usercommand-line usercommand-line userother filesother filesother filesother filesloop (line 134)looploop (line 135)loopopt (line 385)optmain71–72. repo_source_files → _scandir71_scandir +1 more73–76. _ts_language_for → _grammar_available73_grammar_available +3 more77–80. build_context → scope_membership77scope_membership +3 more81. _ast_parse_one_file → _ts_language_for81_ts_language_for▶ test enters82–85. _ast_parse_one_file → _cached_parser82_cached_parser +3 more86–87. _ast_parse_one_file → _disambiguate_header86_disambiguate_header +1 more

… 313 later steps

1 more

tests/test_script_front_end.py:173 · its file's page

What it checks (1)

  1. assert members == { "deploy": "function", "add_firmware": "function", "strict_warnings": "macro definition", } observes _members via members

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_shell_and_cmake_definitions_become_rows→missing_languages→register_paths→emit_definitions→_members

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_shell_and_cmake_definitions_become_rows · 1 checksemit_definitionsensure_symbol_provenanceREQ-DDB-INDEX-004 · measuredemit_definitionsrun_harvestREQ-DDB-PIPE-003 · measuredemit_definitionsrun_harvest_harvest_one_file_parseable_fileREQ-DDB-PIPE-011 · measuredmissing_languagesREQ-DDB-PIPE-012 · measuredemit_definitionsensure_generated_files_tableREQ-DDB-SCHEMA-014 · measured
Also reaches 8 requirements

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