test_a_url_is_refused_by_name

Tests › tests/guard/test_guard_external_catalogs.py

passed Passed in the packaged run.

What this test is for

Why it exists

A pre-commit gate never reaches the network: a URL source is refused, naming it.

Given

  1. —
→

When

  1. read_catalog_at(tmp_path, "https://example.invalid/requirements.yaml")
  2. read_catalog_at( tmp_path, {"repo": "git@github.com:o/r.git", "rev": "abc", "path": "r.yaml"} )
→

Then

  1. ✓ raises ValueError
  2. ✓ raises ValueError

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

… 62 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 filesloop (line 267)looptry (line 269)tryopt (line 1336)optalt (line 1344)alttry (line 1352)trymain63. load_external_requirements → get_requirements63get_requirements64. load_external_requirements → read_catalog_at64read_catalog_at65. read_catalog_at → _refuse_url65_refuse_url▶ test enters66–69. read_catalog_at → git_text66git_text +3 more70. read_catalog_at → _refuse_url70_refuse_url71. read_catalog_at → _catalog_rows71_catalog_rows72. _validate_files → get_requirements72get_requirements

… 285 later steps

tests/guard/test_guard_external_catalogs.py:105 · its file's page

Where the product reaches it

  • main → _run → run_precommit → _validate_files → load_external_requirements → read_catalog_at (flow)

Call flow

test_a_url_is_refused_by_name→read_catalog_at

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_a_url_is_refused_by_nameread_catalog_atgit_textgit_argvREQ-DDB-CONFIG-001 · inferredread_catalog_atREQ-DDB-GUARD-027 · measured
Also reaches 2 requirements

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