Skip to content

Commit f06965c

Browse files
nhortonclaude
andcommitted
Merge hook test files into single test_hooks.py
Consolidate test_hooks_json_format.py and test_hook_wrappers.py into a single test_hooks.py file with logical organization: - TestClaudeHookWrapper / TestGeminiHookWrapper: Platform wrapper scripts - TestRulesStopHook / TestUserPromptSubmitHook: Rules-specific hooks - TestHooksWithTranscript: Transcript input handling - TestHookExitCodes: Exit code contract tests (DO NOT EDIT) - TestHookWrapperIntegration: Integration tests with Python hooks - TestRulesCheckModule: Python module tests Also moved hooks_dir and src_dir fixtures to conftest.py for sharing. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent 669c6bd commit f06965c

3 files changed

Lines changed: 345 additions & 379 deletions

File tree

tests/shell_script_tests/conftest.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,18 @@ def rules_hooks_dir() -> Path:
6868
)
6969

7070

71+
@pytest.fixture
72+
def hooks_dir() -> Path:
73+
"""Return the path to the main hooks directory (platform wrappers)."""
74+
return Path(__file__).parent.parent.parent / "src" / "deepwork" / "hooks"
75+
76+
77+
@pytest.fixture
78+
def src_dir() -> Path:
79+
"""Return the path to the src directory for PYTHONPATH."""
80+
return Path(__file__).parent.parent.parent / "src"
81+
82+
7183
@pytest.fixture
7284
def jobs_scripts_dir() -> Path:
7385
"""Return the path to the jobs scripts directory."""

tests/shell_script_tests/test_hook_wrappers.py

Lines changed: 0 additions & 357 deletions
This file was deleted.

0 commit comments

Comments
 (0)