test_languages_without_a_spec_are_not_mapped

Tests › tests/guard/test_guard_substrate.py

passed Passed in the packaged run.

What this test is for

Why it exists

Go is in the substrate but the gate has no LanguageSpec for it.

Given

  1. —
→

When

  1. language_for_file("main.go", {})
→

Then

  1. ✓ EXTENSION_TO_LANGUAGE does not contain ".go"
  2. ✓ language_for_file("main.go", {}) is None

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.

`main` (clew/guard/main.py) · 3 of 357 steps

… 108 earlier steps

program launcherprogram launcherprogram launcherprogram launcherclew/guard/config.pyclew/guard/config.pyclew/guard/config.pyclew/guard/config.pyclew/guard/ts_parser.pyclew/guard/ts_parser.pyclew/guard/ts_parser.pyclew/guard/ts_parser.pyother filesother filesother filesother filesmain109. resolve_parse_settings → get_validate109get_validate110. parse_content_for_file → language_for_file110language_for_file111. language_for_file → language_for_extension111language_for_extension▶ test enters112–113. language_for_file → _looks_like_cpp_header112_looks_like_cpp_header +1 more114. parse_content_for_file → parse_functions114parse_functions115. parse_functions → parse_functions_ts115parse_functions_ts

… 242 later steps

tests/guard/test_guard_substrate.py:24 · its file's page

What it checks (2)

  1. assert ".go" not in EXTENSION_TO_LANGUAGE not attributed
  2. assert language_for_file("main.go", {}) is None observes language_for_file

Where the product reaches it

  • main → _run → run_precommit → _validate_files → validate_file → parse_content_for_file → language_for_file (flow)

Call flow

test_languages_without_a_spec_are_not_mapped→language_for_file

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_languages_without_a_spec_are_not_mapped · 2 checkslanguage_for_fileREQ-DDB-GUARD-020 · measured
Also reaches 1 requirement

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