test_rust_is_opt_in

Tests › tests/guard/test_guard_rust.py

passed Passed in the packaged run.

What this test is for

Why it exists

The test says nothing about why.

Verifies REQ-DDB-GUARD-024

Given

  1. —
→

When

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

Then

  1. ✓ validate_file(str(RUST_FIXTURE), CONFIG_DEFAULTS, no_git=True) 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.

`main` (clew/guard/main.py) · 13 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)loopopt (line 178)optmain79. 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–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_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_rust.py:133 · its file's page

What it checks (1)

  1. assert validate_file(str(RUST_FIXTURE), CONFIG_DEFAULTS, no_git=True) == [] observes validate_file

Where the product reaches it

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

Call flow

test_rust_is_opt_in→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_rust_is_opt_in · 1 checksvalidate_fileget_file_at_revisionrun_gitgit_argvREQ-DDB-CONFIG-001 · inferredvalidate_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.

Requirements it verifies (1)

requirementlinked byimplementers exercised
REQ-DDB-GUARD-024catalog4 of 5: _collect_rust_doc, _is_rust_test_item, _skip_rust_attributes, apply_autobrief
Also reaches 24 requirements

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