test_the_shell_doc_block_reaches_the_row

Tests › tests/test_script_front_end.py

passed Passed in the packaged run.

What this test is for

Why it exists

The `#` block above a shell function becomes its brief.

Given

  1. db, root = repo
→

When

  1. if not substrate.has_language("bash"): pytest.skip("substrate has no bash grammar; clew requires lang-parsing-substrate>=0.12.0")
  2. register_paths(db, ["scripts/deploy.sh"])
  3. emit_definitions(db, root, None)
2 more
  1. conn = sqlite3.connect(str(db))
  2. try: brief = conn.execute( "SELECT briefdescription FROM memberdef WHERE name = 'deploy'" ).fetchone()[0] finally: conn.close()
→

Then

  1. ✓ brief contains "Deploy the built artefact."

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:194 · its file's page

What it checks (1)

  1. assert "Deploy the built artefact." in brief not attributed

Where the product reaches it

  • main → propose_main → propose → build_context → repo_source_files → _ts_language_for → _grammar_available → has_language (flow)

Call flow

test_the_shell_doc_block_reaches_the_row→has_language→register_paths→emit_definitions

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_shell_doc_block_reaches_the_row · 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 · measuredhas_languageREQ-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.