From b73425f8118dc9cdc0bcd76a14ffd5aa11f9774f Mon Sep 17 00:00:00 2001 From: "google-labs-jules[bot]" <161369871+google-labs-jules[bot]@users.noreply.github.com> Date: Tue, 21 Jul 2026 03:42:14 +0000 Subject: [PATCH] fix(test): configure core.hooksPath for test_hooks.py to run reliably --- CHANGELOG.md | 3 +++ tests/test_hooks.py | 1 + 2 files changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4a15b12..9d0593a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/). ## [Unreleased] +### Fixed +- test_hooks.py missing core.hooksPath configuration causing hook test to bypass git execution in temporary repositories. + ## [0.11.0] — 2026-07-11 Distribution & integration round — reach every agent host, run as a local guardrail, and compose with diff --git a/tests/test_hooks.py b/tests/test_hooks.py index 17e1a92..21e42f5 100644 --- a/tests/test_hooks.py +++ b/tests/test_hooks.py @@ -27,6 +27,7 @@ def _init_repo(root: Path) -> None: subprocess.run(["git", "init", "-q"], cwd=root, check=True) subprocess.run(["git", "config", "user.email", "t@example.com"], cwd=root, check=True) subprocess.run(["git", "config", "user.name", "t"], cwd=root, check=True) + subprocess.run(["git", "config", "core.hooksPath", ".git/hooks"], cwd=root, check=True) @unittest.skipUnless(HAVE_GIT, "git not available")