test_malformed_files_are_reported_not_raised

Tests › tests/test_toolchain.py

passed Passed in the packaged run.

What this test is for

Why it exists

The test says nothing about why.

Verifies REQ-DDB-PIPE-011

Given

  1. (tmp_path / "toolchain.toml").write_text("[ignore\n")
  2. (tmp_path / "suppress.toml").write_text('[[suppress]]\ntool = "*"\nfile_glob = 3\n')
→

When

  1. config = load_toolchain_config(tmp_path)
→

Then

  1. ✓ config.index_globs equals ()
  2. ✓ any("could not be read" in p for p in config.problems) holds

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

… 85 earlier steps

program launcherprogram launcherprogram launcherprogram launcherother filesother filesother filesother filesopt (line 178)opttry (line 118)tryopt (line 184)optloop (line 186)loopelif (line 191)elifmain86–87. gate_exclusion → _gate_matcher86_gate_matcher +1 more88. load_toolchain_config → _read_toml88_read_toml▶ test enters89–90. _read_toml → require_toml_module89require_toml_module +1 more91. load_toolchain_config → _string_list91_string_list92–95. _string_list → all92all +3 more96–98. load_toolchain_config → _string_list96_string_list +2 more99. load_toolchain_config → _entry_globs99_entry_globs100. _gate_matcher → compile_globs100compile_globs

… 257 later steps

1 more

tests/test_toolchain.py:67 · its file's page

What it checks (2)

  1. assert config.index_globs == () observes load_toolchain_config via config
  2. assert any("could not be read" in p for p in config.problems) observes load_toolchain_config via config

Where the product reaches it

  • main → _run → run_precommit → _validate_files → validate_file → gate_exclusion → _gate_matcher → load_toolchain_config (flow)

Call flow

test_malformed_files_are_reported_not_raised→load_toolchain_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_malformed_files_are_reported_not_raised · 2 checksload_toolchain_configREQ-DDB-CONFIG-009 · measuredload_toolchain_config_string_listallREQ-DDB-WIKI-054 · inferred

Requirements it verifies (1)

requirementlinked byimplementers exercised
REQ-DDB-PIPE-011catalogunknown
Also reaches 2 requirements

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