test_off_by_default_nothing_changes

Tests › tests/guard/test_guard_dependency_coverage.py

passed Passed in the packaged run.

What this test is for

Why it exists

Without the option every one stays uncovered, and `covered_via` is absent.

Given

  1. product = _setup(tmp_path, through=False)
  2. monkeypatch.chdir(product)
→

When

  1. report = analyze_coverage(["src"], load_config(product / ".clew.yaml"))
→

Then

  1. ✓ report does not contain "covered_via"
  2. ✓ report["uncovered"] equals ["REQ-PRD-001", "REQ-PRD-002", "REQ-PRD-003"]

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) · 82 of 357 steps

… 16 earlier steps

program launcherprogram launcherprogram launcherprogram launcherprogram launcherclew/guard/main.pyclew/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/config.pyother filesother filesother filesother filesother filesopt (line 733)optopt (line 705)optopt (line 445)optloop (line 417)loopopt (line 420)optalt (line 421)altopt (line 715)optloop (line 793)loopopt (line 795)optloop (line 651)loopopt (line 653)optmain17. _run → _setup_logging17_setup_logging18. _run → load_config18load_config19. load_config → refuse_doxygen_guard_leftovers19refuse_doxygen_guard_leftovers▶ test enters20. load_config → _fresh_defaults20_fresh_defaults21–22. load_config → read_requirements_section21read_requirements_section +1 more23–25. _validate_node → _validate_map_of23_validate_map_of +2 more26–27. _validate_node → _validate_dict_node26_validate_dict_node +1 more28. _validate_dict_node → _suggest_key28_suggest_key29. _suggest_key → list29list30. _validate_dict_node → _validate_node30_validate_node31. load_config → _shared_facts31_shared_facts32. _shared_facts → list32list33. load_config → read_guard_section33read_guard_section34. load_config → _fresh_defaults34_fresh_defaults35–43. load_config → validate_config_schema35validate_config_schema +8 more44. apply_opt_in_languages → deep_merge44deep_merge45. deep_merge → deep_merge45deep_merge46. load_config → deep_merge46deep_merge47. _run → run_precommit47run_precommit48. run_precommit → report_dir48report_dir

… 5 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/impact.pyclew/guard/impact.pyclew/guard/impact.pyclew/guard/impact.pyloop (line 391)loopmain54. run_precommit → _validate_files54_validate_files55. _validate_files → load_requirements_full55load_requirements_full56. load_requirements_full → _get_requirements_config56_get_requirements_config57. _get_requirements_config → get_requirements57get_requirements58. _get_requirements_config → resolve_contained_path58resolve_contained_path59. load_requirements_full → _validate_requirements59_validate_requirements60. _validate_requirements → get_validate60get_validate61. _validate_requirements → _summarise_id61_summarise_id62. _validate_files → load_external_requirements62load_external_requirements63. load_external_requirements → get_requirements63get_requirements

… 2 steps between

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

… 12 steps between

program launcherprogram launcherprogram launcherprogram launcherclew/guard/main.pyclew/guard/main.pyclew/guard/main.pyclew/guard/main.pyother filesother filesother filesother filesloop (line 69)loopopt (line 178)optmain84. excluded_by → matches84matches85. validate_file → gate_exclusion85gate_exclusion86–87. gate_exclusion → _gate_matcher86_gate_matcher +1 more88–89. load_toolchain_config → _read_toml88_read_toml +1 more

… 8 steps between

program launcherprogram launcherprogram launcherprogram launcherprogram launcherclew/guard/main.pyclew/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/config.pyclew/guard/ts_parser.pyclew/guard/ts_parser.pyclew/guard/ts_parser.pyclew/guard/ts_parser.pyclew/guard/ts_parser.pyother filesother filesother filesother filesother filesopt (line 184)optloop (line 186)loopopt (line 189)optopt (line 98)optopt (line 168)optloop (line 647)loopopt (line 786)optopt (line 652)optmain98–99. load_toolchain_config → _entry_globs98_entry_globs +1 more100. _gate_matcher → compile_globs100compile_globs101. gate_exclusion → matches101matches102. gate_exclusion → binary_file102binary_file103. validate_file → parse_source_file103parse_source_file104. parse_source_file → parse_source_file_with_content104parse_source_file_with_content105–109. parse_source_file_with_content → parse_content_for_file105parse_content_for_file +4 more110. parse_content_for_file → language_for_file110language_for_file111–112. language_for_file → language_for_extension111language_for_extension +1 more113. language_for_file → _language_from_config113_language_from_config114. parse_content_for_file → parse_functions114parse_functions115. parse_functions → parse_functions_ts115parse_functions_ts116. parse_functions_ts → get_parser_for_language116get_parser_for_language117. parse_functions_ts → get_language_spec117get_language_spec118–119. parse_functions_ts → _collect_functions118_collect_functions +1 more120. _is_rust_test_item → _rust_attributes120_rust_attributes121. _collect_functions → _enclosing_class_for121_enclosing_class_for122. _enclosing_class_for → _rust_impl_self_type122_rust_impl_self_type123. _collect_functions → _declared_function123_declared_function124–125. _collect_functions → _append_declaration124_append_declaration +1 more

… 1 step between

program launcherprogram launcherprogram launcherprogram launcherclew/guard/ts_parser.pyclew/guard/ts_parser.pyclew/guard/ts_parser.pyclew/guard/ts_parser.pyother filesother filesother filesother filesloop (line 647)loopopt (line 658)optopt (line 377)optalt (line 380)altopt (line 383)optopt (line 384)optopt (line 400)optopt (line 681)optopt (line 683)optmain127–128. _append_declaration → _qualified_enclosing127_qualified_enclosing +1 more129–130. _collect_functions → _resolve_function_node129_resolve_function_node +1 more131. _resolve_function_node → _bound_function131_bound_function132–137. _collect_functions → _extract_function_name132_extract_function_name +5 more138–140. _find_preceding_doxygen → _collect_rust_doc138_collect_rust_doc +2 more141. _find_preceding_doxygen → _collect_c_comment141_collect_c_comment142. _find_preceding_doxygen → _find_python_docstring_block142_find_python_docstring_block143. _find_preceding_doxygen → parse_doxygen_tags143parse_doxygen_tags144. _find_preceding_doxygen → apply_autobrief144apply_autobrief145. _find_preceding_doxygen → _last_row145_last_row146–149. _collect_functions → _qualified_enclosing146_qualified_enclosing +3 more150. _js_returns_void → _function_carrier150_function_carrier151. _collect_functions → _produced_class151_produced_class152. _produced_class → _function_carrier152_function_carrier153. _collect_functions → _collect_functions153_collect_functions

… 141 steps between

program launcherprogram launcherprogram launcherprogram launcherprogram launcherclew/guard/main.pyclew/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/config.pyclew/guard/impact.pyclew/guard/impact.pyclew/guard/impact.pyclew/guard/impact.pyclew/guard/impact.pyclew/guard/coverage.pyclew/guard/coverage.pyclew/guard/coverage.pyclew/guard/coverage.pyclew/guard/coverage.pyother filesother filesother filesother filesother filesloop (line 179)looploop (line 182)looploop (line 208)looploop (line 150)loopmain295. _coverage_gate → get_requirements295get_requirements296. _coverage_gate → analyze_coverage296analyze_coverage297. analyze_coverage → load_requirements_full297load_requirements_full▶ test enters298. analyze_coverage → collect_tagged_functions298collect_tagged_functions299. collect_tagged_functions → find_source_files299find_source_files300. find_source_files → get_validate300get_validate301–306. find_source_files → _git_ls_files301_git_ls_files +5 more307. collect_tagged_functions → _process_source_file307_process_source_file308. _process_source_file → parse_source_file_with_content308parse_source_file_with_content309. _process_source_file → _extract_tagged_function309_extract_tagged_function310–312. analyze_coverage → _collect_req_ids310_collect_req_ids +2 more313. _exempt → get_requirements313get_requirements314. _exempt → exemption314exemption315. exemption → list315list316. analyze_coverage → traceability316traceability317. traceability → is_test_path317is_test_path318. is_test_path → _matcher318_matcher

… 39 later steps

4 more

tests/guard/test_guard_dependency_coverage.py:79 · its file's page

What it checks (2)

  1. assert "covered_via" not in report observes analyze_coverage via report
  2. assert report["uncovered"] == ["REQ-PRD-001", "REQ-PRD-002", "REQ-PRD-003"] observes analyze_coverage via report

Where the product reaches it

  • main → _run → run_precommit → _coverage_gate → analyze_coverage (flow)
  • main → _run → load_config (flow)

Call flow

test_off_by_default_nothing_changes→_setup→analyze_coverage→load_config

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_off_by_default_nothing_changes · 2 checksanalyze_coverage… 3 calls …git_argvREQ-DDB-CONFIG-001 · measuredanalyze_coveragecollect_tagged_functionsfind_source_filesgate_exclusionREQ-DDB-CONFIG-009 · measuredanalyze_coverageload_requirements_fullREQ-DDB-GUARD-011 · measuredload_configREQ-DDB-GUARD-012 · measuredanalyze_coveragecollect_tagged_functionsfind_source_filesREQ-DDB-GUARD-013 · measuredanalyze_coverageload_requirements_full_get_requirements_configresolve_contained_pathREQ-DDB-GUARD-016 · measuredanalyze_coveragecollect_tagged_functions_process_source_fileparse_source_file_with_contentREQ-DDB-GUARD-018 · measuredanalyze_coverage… 8 calls …parse_doxygen_tagsREQ-DDB-GUARD-019 · measuredanalyze_coverage… 4 calls …language_for_fileREQ-DDB-GUARD-020 · measuredanalyze_coverage… 8 calls …_find_python_docstring_blockREQ-DDB-GUARD-021 · inferredanalyze_coverageREQ-DDB-GUARD-022 · measuredload_configapply_opt_in_languagesREQ-DDB-GUARD-024 · measured

and 5 more requirement paths, listed below.

Also reaches 17 requirements

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