diff --git a/tests/test_generated_commit_guard.py b/tests/test_generated_commit_guard.py index f78c8933..728a12d4 100644 --- a/tests/test_generated_commit_guard.py +++ b/tests/test_generated_commit_guard.py @@ -31,6 +31,11 @@ def test_ci_checks_each_commit_in_range(tmp_path): def git(*args): return subprocess.check_output(["git", *args], cwd=tmp_path).decode().strip() git("init", "-q") + # This fixture deliberately creates a rejected historical commit so CI's + # range checker can inspect it. Isolate it from the workstation's real hook. + hooks = tmp_path / "fixture-hooks" + hooks.mkdir() + git("config", "core.hooksPath", str(hooks)) git("config", "user.name", "Test") git("config", "user.email", "test@example.test") (tmp_path / "source.py").write_text("source\n")