test_a_non_source_file_stays_silent

Tests › tests/guard/test_guard_main.py

passed Passed in the packaged run.

What this test is for

Why it exists

THE CONTROL that keeps the line where it is. The gate ships no language for Markdown, so Markdown is not something it failed to check.

Given

  1. doc = tmp_path / "README.md"
  2. doc.write_text("# hello\n")
2 more
  1. monkeypatch.chdir(tmp_path)
  2. rc = main(["--config", NO_REQ_CONFIG, "validate", "--no-git", str(doc)])
→

When

  1. —
→

Then

  1. ✓ rc equals 0
  2. ✓ "".join(capsys.readouterr()) does not contain "not checked"

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

program launcherprogram launcherprogram launcherprogram launcherprogram launcherprogram launcherclew/guard/main.pyclew/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/config.pyclew/guard/impact.pyclew/guard/impact.pyclew/guard/impact.pyclew/guard/impact.pyclew/guard/impact.pyclew/guard/impact.pyother filesother filesother filesother filesother filesother filestry (line 717)tryopt (line 730)optopt (line 733)optopt (line 705)optloop (line 417)loopopt (line 420)optalt (line 421)altopt (line 715)optloop (line 793)loopopt (line 795)optloop (line 651)loopopt (line 653)optloop (line 391)looploop (line 267)looptry (line 269)tryopt (line 1336)optmain1. main → _check_retired_subcommand1_check_retired_subcommand▶ test enters2. _check_retired_subcommand → _first_positional2_first_positional3–5. main → _run3_run +2 more6. _run → build_parser6build_parser7. build_parser → _add_validate_parser7_add_validate_parser8. _add_validate_parser → list8list9. list → link9link10–14. build_parser → _add_impact_parser10_add_impact_parser +4 more15. _run → _has_subcommand15_has_subcommand16–17. _run → _parse_precommit_args16_parse_precommit_args +1 more18. _run → load_config18load_config19. load_config → refuse_doxygen_guard_leftovers19refuse_doxygen_guard_leftovers20. load_config → _fresh_defaults20_fresh_defaults21. load_config → read_requirements_section21read_requirements_section22–25. read_requirements_section → _validate_node22_validate_node +3 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_dir49. run_precommit → resolve_version_gate49resolve_version_gate50. resolve_version_gate → get_validate50get_validate51. resolve_version_gate → _detect_current_version51_detect_current_version52. _detect_current_version → get_validate52get_validate53–54. run_precommit → _report_violations53_report_violations +1 more55. _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_requirements64. load_external_requirements → read_catalog_at64read_catalog_at65. read_catalog_at → _refuse_url65_refuse_url

… 4 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/checks.pyclew/guard/checks.pyclew/guard/checks.pyclew/guard/checks.pyclew/guard/checks.pyother filesother filesother filesother filesother filesalt (line 1344)altloop (line 973)looploop (line 974)looploop (line 287)looploop (line 288)looptry (line 345)tryloop (line 326)looploop (line 69)loopopt (line 178)optmain70–71. read_catalog_at → _refuse_url70_refuse_url +1 more72. _validate_files → get_requirements72get_requirements73. _validate_files → check_satisfies73check_satisfies74. check_satisfies → link_ids74link_ids75. link_ids → satisfies_ids75satisfies_ids76. _validate_files → load_failure_mode_ids76load_failure_mode_ids77. load_failure_mode_ids → _get_requirements_config77_get_requirements_config78. load_failure_mode_ids → _raw_entries78_raw_entries79. load_failure_mode_ids → modes_of79modes_of80. _validate_files → validate_file80validate_file81. validate_file → get_validate81get_validate82. validate_file → excluded_by82excluded_by83–84. excluded_by → compile_globs83compile_globs +1 more85. 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 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 184)optloop (line 186)loopopt (line 189)optopt (line 98)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–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_language156. validate_file → check_file_presence156check_file_presence157. check_file_presence → get_validate157get_validate

… 84 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.pyloop (line 607)loopmain242–243. check_version_staleness → _check_one_version242_check_one_version +1 more244. _validate_files → _report_skips244_report_skips245. run_precommit → report_dir245report_dir246. run_precommit → validate_output_path246validate_output_path

… 84 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 filesopt (line 368)optalt (line 608)altmain331. format_coverage_text → _via331_via332. _coverage_gate → traceability_line332traceability_line333–336. _run → build_parser333build_parser +3 more337. run_validate → _report_violations337_report_violations338–340. run_validate → resolve_version_gate338resolve_version_gate +2 more341. _dispatch_subcommand → _run_impact_command341_run_impact_command342. _run_impact_command → impact_report342impact_report343. _run_impact_command → format_report343format_report344. format_report → 344… 1 call not run345. _run_impact_command → 345… 2 calls not run346. _dispatch_subcommand → _run_coverage_command346_run_coverage_command347. _run_coverage_command → run_coverage347run_coverage348–349. run_coverage → analyze_coverage348analyze_coverage +1 more350. _dispatch_subcommand → _run_config_command350_run_config_command351. _run_config_command → build_effective_contract351build_effective_contract352. _run_config_command → build_schema_contract352build_schema_contract353. _dispatch_subcommand → _run_files_command353_run_files_command354. _run_files_command → build_files_contract354build_files_contract355. _dispatch_subcommand → _run_doxyfile_command355_run_doxyfile_command356. _run_doxyfile_command → build_fragment356build_fragment357. _run → load_config357load_config
3 more

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

What it checks (2)

  1. assert rc == 0 not attributed
  2. assert "not checked" not in "".join(capsys.readouterr()) not attributed

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.

Also reaches 11 requirements

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