-
Notifications
You must be signed in to change notification settings - Fork 54
Allow external callers to configure the hook directory #951
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -39,6 +39,13 @@ def test_no_tests_dir(self, parser: Parser): | |
| parser.parse(tests_dir, None) | ||
| assert "Test path" in str(exc_info.value) | ||
|
|
||
| def test_custom_hook_root_is_used(self, parser: Parser, tmp_path: Path): | ||
| hook_root = tmp_path / "hooks" | ||
| parser = Parser(parser.system_config_path, hook_root) | ||
|
|
||
| assert parser.hook_root == hook_root | ||
| assert parser.hook_test_root == hook_root / "test" | ||
|
Comment on lines
+42
to
+47
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win Exercise These assertions still pass if 🤖 Prompt for AI Agents |
||
|
|
||
| @patch("cloudai.test_parser.TestParser.parse_all") | ||
| def test_no_scenario(self, test_parser: Mock, parser: Parser): | ||
| tests_dir = parser.system_config_path.parent.parent / "test" | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win
Cover all commands that now accept
--hook-dir.This only locks the help text for
dry-run, but the PR contract is broader (install,uninstall,run,dry-run,generate-report). If one command later drops@common_options, this regression test still passes. Please parametrize this check over the full command set.🤖 Prompt for AI Agents