claude-dev-env 8.36.0 → 8.36.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
from hooks_constants import piped_pytest_blocker_constants as constants
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
def test_pytest_programs_and_interpreters_cover_supported_invocations() -> None:
|
|
5
|
+
assert {"pytest", "pytest.exe", "py.test"} <= constants.ALL_PYTEST_PROGRAM_BASENAMES
|
|
6
|
+
assert constants.PYTHON_INTERPRETER_BASENAME_PATTERN.fullmatch("python3.12.exe")
|
|
7
|
+
assert (constants.MODULE_RUN_FLAG, constants.PYTEST_MODULE_NAME) == ("-m", "pytest")
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
def test_pipe_and_wrapper_tokens_preserve_command_boundaries() -> None:
|
|
11
|
+
assert {"|", "|&"} <= constants.ALL_PIPE_OPERATOR_TOKENS
|
|
12
|
+
assert ";;" in constants.ALL_SEGMENT_RESET_OPERATOR_TOKENS
|
|
13
|
+
assert "-u" in constants.ALL_WRAPPER_OPTION_GRAMMARS_BY_NAME["sudo"].all_value_taking_options
|
|
14
|
+
assert constants.ALL_WRAPPER_OPTION_GRAMMARS_BY_NAME["timeout"].leading_operand_count == 1
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
from hooks_constants import verify_before_acting_constants as constants
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
def test_mutating_tool_and_mcp_names_are_classified() -> None:
|
|
5
|
+
assert {"Write", "Edit"} <= constants.ALL_ALWAYS_MUTATING_TOOL_NAMES
|
|
6
|
+
assert {"Bash", "PowerShell"} == constants.ALL_SHELL_TOOL_NAMES
|
|
7
|
+
assert constants.MCP_ACTION_WORD_SPLIT_PATTERN.split("create_pull_request") == [
|
|
8
|
+
"create",
|
|
9
|
+
"pull",
|
|
10
|
+
"request",
|
|
11
|
+
]
|
|
12
|
+
assert "create" in constants.ALL_MCP_MUTATING_VERBS
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
def test_hedge_pattern_matches_a_hedged_claim_only() -> None:
|
|
16
|
+
assert constants.HEDGE_PATTERN.search("Perhaps the command writes a file.")
|
|
17
|
+
assert constants.HEDGE_PATTERN.search("I might be mistaken.")
|
|
18
|
+
assert constants.HEDGE_PATTERN.search("I checked the command output.") is None
|