test_generate_refuses_a_dirty_clew_tree

Tests › tests/test_tool_tree_refusal.py

passed Passed in the packaged run.

What this test is for

Why it exists

THE TARGET CHECK IS STUBBED so the only reason left to refuse is the clew tree; without that, a missing target checkout would return 1 and this test would pass for the wrong reason.

Given

  1. spent: list[str] = []
  2. monkeypatch.setattr(cli, "check_revision", lambda *_a, **_k: None)
3 more
  1. monkeypatch.setattr(cli, "run_cell", lambda cell, *_a, **_k: spent.append(cell.stem()))
  2. monkeypatch.setattr(runner, "tool_identity", lambda: {"clew_commit": _SHA, "clew_dirty": True})
  3. args = cli.argparse.Namespace( rubric=_MBEDTLS, models=["claude-haiku-5-5"], replicates=1, seed=7, repo=tmp_path / "repo", out=tmp_path / "answers", mcp_config=None, timeout=60, resume=False, )
→

When

  1. cli.cmd_generate(args)
→

Then

  1. ✓ cli.cmd_generate(args) equals 1
  2. ✓ spent is false
  3. ✓ capsys.readouterr().err contains "REFUSED"

tests/test_tool_tree_refusal.py:71 · its file's page

What it checks (3)

  1. assert cli.cmd_generate(args) == 1 observes cmd_generate
  2. assert not spent, f"{len(spent)} cell(s) were generated against a modified clew tree" not attributed
  3. assert "REFUSED" in capsys.readouterr().err not attributed

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_generate_refuses_a_dirty_clew_tree→cmd_generate

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_generate_refuses_a_dirty_clew_tree · 3 checkscmd_generatetool_identity_substratecompiled_languagesREQ-DDB-PIPE-012 · inferred
Also reaches 1 requirement

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