test_unused_var_is_refused

Tests › tests/test_descriptions.py

passed Passed in the packaged run.

What this test is for

Why it exists

The subtle half of the template contract. A RENAMED placeholder still renders — the old var is simply ignored and the new `{brace}` stays literal — so refusing an unused var is what turns that into an error instead of prose a model reads.

Given

  1. _redirect(monkeypatch, tmp_path)
  2. (tmp_path / "_templates").mkdir()
2 more
  1. (tmp_path / "_templates" / "t.json").write_text( json.dumps({"text": ["hello {lead}"]}), encoding="utf-8" )
  2. _put(tmp_path, "callers", {"template": "t", "vars": {"lead": "x", "stale": "y"}})
→

When

  1. d.load_descriptions()
→

Then

  1. ✓ raises ValueError

tests/test_descriptions.py:293 · its file's page

Where the product reaches it

No product flow reaches this code: no product entry point's flow calls any of the functions this test calls.

Call flow

test_unused_var_is_refused→_redirect→_put→load_descriptions

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_unused_var_is_refusedload_descriptionsREQ-DDB-MCP-001 · measuredload_descriptions_entry_joinedallREQ-DDB-WIKI-054 · inferred
Also reaches 2 requirements

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