test_files_envelope

Tests › tests/guard/test_guard_contract.py

passed Passed in the packaged run.

What this test is for

Why it exists

The test says nothing about why.

Given

  1. monkeypatch.chdir(tmp_path)
→

When

  1. build_files_contract(["."], CONFIG_DEFAULTS)
→

Then

  1. ✓ set(build_files_contract(["."], CONFIG_DEFAULTS)) equals self.FILES_KEYS

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) · 9 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

… 13 steps between

program launcherprogram launcherprogram launcherprogram launcherclew/guard/main.pyclew/guard/main.pyclew/guard/main.pyclew/guard/main.pyother filesother filesother filesother filesopt (line 178)optmain85. validate_file → gate_exclusion85gate_exclusion86. gate_exclusion → _gate_matcher86_gate_matcher87. _gate_matcher → load_toolchain_config87load_toolchain_config▶ test enters88–89. load_toolchain_config → _read_toml88_read_toml +1 more

… 8 steps between

program launcherprogram launcherprogram launcherprogram launcherother 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_globs▶ test enters101–102. gate_exclusion → matches101matches +1 more

… 195 steps between

program launcherprogram launcherprogram launcherprogram launcherclew/guard/config.pyclew/guard/config.pyclew/guard/config.pyclew/guard/config.pyclew/guard/coverage.pyclew/guard/coverage.pyclew/guard/coverage.pyclew/guard/coverage.pyother filesother filesother filesother filesloop (line 179)loopmain298. analyze_coverage → collect_tagged_functions298collect_tagged_functions299. collect_tagged_functions → find_source_files299find_source_files300. find_source_files → get_validate300get_validate▶ test enters301–304. find_source_files → _git_ls_files301_git_ls_files +3 more305–306. find_source_files → excluded_by305excluded_by +1 more

… 51 later steps

4 more

tests/guard/test_guard_contract.py:253 · its file's page

What it checks (1)

  1. assert set(build_files_contract(["."], CONFIG_DEFAULTS)) == self.FILES_KEYS observes build_files_contract

Where the product reaches it

  • main → _run → _dispatch_subcommand → _run_files_command → build_files_contract (flow)

Call flow

test_files_envelope→build_files_contract

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_files_envelope · 1 checksbuild_files_contractfind_source_files_git_ls_filesgit_argvREQ-DDB-CONFIG-001 · measuredbuild_files_contracttoolchain_contractREQ-DDB-CONFIG-009 · measuredbuild_files_contractfind_source_filesREQ-DDB-GUARD-013 · measuredbuild_files_contractREQ-DDB-GUARD-015 · measuredbuild_files_contractfind_source_filesgate_exclusionbinary_fileREQ-DDB-PIPE-011 · inferredbuild_files_contract… 4 calls …allREQ-DDB-WIKI-054 · inferred
Also reaches 6 requirements

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