test_unknown_extension_skipped

Tests › tests/guard/test_guard_impact.py

passed Passed in the packaged run.

What this test is for

Why it exists

The test says nothing about why.

Given

  1. rs_file = tmp_path / "test.rs"
  2. rs_file.write_text("fn foo() {}")
  3. def mock_runner(cmd): return "@@ -1,1 +1,1 @@\n-old\n+new\n"
→

When

  1. result = collect_changed_functions( [str(rs_file)], CONFIG_DEFAULTS, staged=True, run_command=mock_runner, )
→

Then

  1. ✓ result equals []

What this test is for

Why it exists

The test says nothing about why.

Given

  1. py_file = tmp_path / "script.rs"
  2. py_file.write_text("fn foo() {}")
→

When

  1. violations = validate_file(str(py_file), CONFIG_DEFAULTS, no_git=True)
→

Then

  1. ✓ violations equals []

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.

tests/guard/test_guard_impact.py

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

… 65 earlier steps

program launcherprogram launcherprogram launcherprogram launcherother filesother filesother filesother filesopt (line 1336)optalt (line 1344)altmain66–67. read_catalog_at → git_text66git_text +1 more68–69. git_argv → _no_ext_diff68_no_ext_diff +1 more70–71. read_catalog_at → _refuse_url70_refuse_url +1 more

… 30 steps between

program launcherprogram launcherprogram launcherprogram launcherclew/guard/main.pyclew/guard/main.pyclew/guard/main.pyclew/guard/main.pyclew/guard/config.pyclew/guard/config.pyclew/guard/config.pyclew/guard/config.pyother filesother filesother filesother filesmain102. gate_exclusion → binary_file102binary_file103. validate_file → parse_source_file103parse_source_file104–107. parse_source_file → parse_source_file_with_content104parse_source_file_with_content +3 more108–109. parse_content_for_file → resolve_parse_settings108resolve_parse_settings +1 more

… 119 steps between

program launcherprogram launcherprogram launcherprogram launcherclew/guard/main.pyclew/guard/main.pyclew/guard/main.pyclew/guard/main.pyclew/guard/config.pyclew/guard/config.pyclew/guard/config.pyclew/guard/config.pyclew/guard/checks.pyclew/guard/checks.pyclew/guard/checks.pyclew/guard/checks.pyother filesother filesother filesother filesopt (line 265)optmain229. validate_file → get_file_at_revision229get_file_at_revision230. get_file_at_revision → run_git230run_git231. run_git → git_argv231git_argv232. validate_file → parse_content_for_file232parse_content_for_file233. validate_file → check_version_staleness233check_version_staleness

… 23 steps between

program launcherprogram launcherprogram launcherprogram launcherprogram launcherclew/guard/config.pyclew/guard/config.pyclew/guard/config.pyclew/guard/config.pyclew/guard/config.pyclew/guard/impact.pyclew/guard/impact.pyclew/guard/impact.pyclew/guard/impact.pyclew/guard/impact.pyother filesother filesother filesother filesother filesloop (line 188)loopopt (line 114)optopt (line 116)optopt (line 92)optopt (line 94)optopt (line 98)optmain257. get_changed_files → run_git257run_git258. impact_report → collect_changes258collect_changes259. collect_changes → _collect_changed_lines259_collect_changed_lines▶ test enters260. _collect_changed_lines → _get_file_diff260_get_file_diff261. _get_file_diff → get_staged_diff261get_staged_diff262. get_staged_diff → run_git262run_git263. _get_file_diff → get_diff263get_diff264. get_diff → run_git264run_git265. _collect_changed_lines → parse_changed_lines265parse_changed_lines266. _collect_changed_lines → _get_file_diff266_get_file_diff267. _collect_changed_lines → parse_changed_lines267parse_changed_lines268. collect_changes → _extract_changed_functions268_extract_changed_functions269. _extract_changed_functions → parse_source_file269parse_source_file270. impact_report → find_index270find_index271. find_index → registered_index271registered_index

… 86 later steps

4 more

tests/guard/test_guard_main.py

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

… 78 earlier steps

program launcherprogram launcherprogram launcherprogram launcherclew/guard/main.pyclew/guard/main.pyclew/guard/main.pyclew/guard/main.pyclew/guard/config.pyclew/guard/config.pyclew/guard/config.pyclew/guard/config.pyclew/guard/impact.pyclew/guard/impact.pyclew/guard/impact.pyclew/guard/impact.pyother filesother filesother filesother filestry (line 345)tryloop (line 326)looploop (line 69)loopmain79. load_failure_mode_ids → modes_of79modes_of80. _validate_files → validate_file80validate_file81. validate_file → get_validate81get_validate▶ test enters82. validate_file → excluded_by82excluded_by83–84. excluded_by → compile_globs83compile_globs +1 more85. validate_file → gate_exclusion85gate_exclusion86. gate_exclusion → _gate_matcher86_gate_matcher87–88. _gate_matcher → load_toolchain_config87load_toolchain_config +1 more

… 11 steps between

program launcherprogram launcherprogram launcherprogram launcherclew/guard/main.pyclew/guard/main.pyclew/guard/main.pyclew/guard/main.pyclew/guard/config.pyclew/guard/config.pyclew/guard/config.pyclew/guard/config.pyother filesother filesother filesother filesopt (line 98)optmain100. _gate_matcher → compile_globs100compile_globs101. gate_exclusion → matches101matches102. gate_exclusion → binary_file102binary_file103. validate_file → parse_source_file103parse_source_file▶ test enters104–107. parse_source_file → parse_source_file_with_content104parse_source_file_with_content +3 more108–109. parse_content_for_file → resolve_parse_settings108resolve_parse_settings +1 more

… 43 steps between

program launcherprogram launcherprogram launcherprogram launcherclew/guard/main.pyclew/guard/main.pyclew/guard/main.pyclew/guard/main.pyclew/guard/config.pyclew/guard/config.pyclew/guard/config.pyclew/guard/config.pyclew/guard/checks.pyclew/guard/checks.pyclew/guard/checks.pyclew/guard/checks.pyclew/guard/ts_parser.pyclew/guard/ts_parser.pyclew/guard/ts_parser.pyclew/guard/ts_parser.pyloop (line 647)loopopt (line 658)optopt (line 681)optopt (line 683)optopt (line 227)opttry (line 241)trymain153–154. _collect_functions → _collect_functions153_collect_functions +1 more155. validate_file → unconfigured_language155unconfigured_language▶ test enters156. validate_file → check_file_presence156check_file_presence157. check_file_presence → get_validate157get_validate

… 200 later steps

tests/guard/test_guard_impact.py:92 · its file's page

What it checks (1)

  1. assert result == [] observes collect_changed_functions via result

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_unknown_extension_skipped→collect_changed_functions

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_unknown_extension_skipped · 1 checkscollect_changed_functions… 5 calls …git_argvREQ-DDB-CONFIG-001 · measuredcollect_changed_functionsREQ-DDB-GUARD-008 · measuredcollect_changed_functionscollect_changesREQ-DDB-GUARD-010 · measuredcollect_changed_functions… 5 calls …get_language_configREQ-DDB-GUARD-013 · measuredcollect_changed_functionscollect_changes_extract_changed_functionsparse_source_fileREQ-DDB-GUARD-018 · measuredcollect_changed_functions… 9 calls …parse_doxygen_tagsREQ-DDB-GUARD-019 · inferredcollect_changed_functions… 5 calls …language_for_fileREQ-DDB-GUARD-020 · inferredcollect_changed_functions… 9 calls …_find_python_docstring_blockREQ-DDB-GUARD-021 · inferredcollect_changed_functionscollect_changes_collect_changed_linesparse_changed_linesREQ-DDB-GUARD-023 · measuredcollect_changed_functions… 8 calls …_is_rust_test_itemREQ-DDB-GUARD-024 · inferredcollect_changed_functions… 8 calls …_js_returns_voidREQ-DDB-GUARD-025 · inferred

tests/guard/test_guard_main.py:31 · its file's page

What it checks (1)

  1. assert violations == [] observes validate_file via violations

Where the product reaches it

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

Call flow

test_unknown_extension_skipped→validate_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_unknown_extension_skipped · 1 checksvalidate_fileget_file_at_revisionrun_gitgit_argvREQ-DDB-CONFIG-001 · measuredvalidate_filegate_exclusionREQ-DDB-CONFIG-009 · measuredvalidate_fileREQ-DDB-GUARD-001 · measuredvalidate_filecheck_version_stalenessREQ-DDB-GUARD-002 · inferredvalidate_filecheck_tagsREQ-DDB-GUARD-003 · inferredvalidate_filecheck_req_coverageREQ-DDB-GUARD-004 · inferredvalidate_filecheck_return_presenceREQ-DDB-GUARD-005 · inferredvalidate_filecheck_file_presenceREQ-DDB-GUARD-006 · inferredvalidate_filecheck_duplicate_tagsREQ-DDB-GUARD-007 · inferredvalidate_filecheck_req_coverage_has_active_requirementsfilter_requirements_by_versionREQ-DDB-GUARD-009 · inferredvalidate_filecheck_req_coverage_has_active_requirementsload_requirements_fullREQ-DDB-GUARD-011 · inferredvalidate_fileunconfigured_languageREQ-DDB-GUARD-013 · measured

and 13 more requirement paths, listed below.

Also reaches 27 requirements

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