test_host_policy_validations() — langchain Function Reference
Architecture documentation for the test_host_policy_validations() function in test_shell_execution_policies.py from the langchain codebase.
Entity Profile
Dependency Diagram
graph TD de9b35f7_896b_b11e_19e3_baaf3d2da7e3["test_host_policy_validations()"] 6b16168d_9880_7f41_060c_9fcd5b337996["test_shell_execution_policies.py"] de9b35f7_896b_b11e_19e3_baaf3d2da7e3 -->|defined in| 6b16168d_9880_7f41_060c_9fcd5b337996 style de9b35f7_896b_b11e_19e3_baaf3d2da7e3 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
libs/langchain_v1/tests/unit_tests/agents/middleware/implementations/test_shell_execution_policies.py lines 57–65
def test_host_policy_validations() -> None:
with pytest.raises(ValueError, match="max_output_lines must be positive"):
HostExecutionPolicy(max_output_lines=0)
with pytest.raises(ValueError, match="cpu_time_seconds must be positive if provided"):
HostExecutionPolicy(cpu_time_seconds=0)
with pytest.raises(ValueError, match="memory_bytes must be positive if provided"):
HostExecutionPolicy(memory_bytes=-1)
Domain
Subdomains
Source
Frequently Asked Questions
What does test_host_policy_validations() do?
test_host_policy_validations() is a function in the langchain codebase, defined in libs/langchain_v1/tests/unit_tests/agents/middleware/implementations/test_shell_execution_policies.py.
Where is test_host_policy_validations() defined?
test_host_policy_validations() is defined in libs/langchain_v1/tests/unit_tests/agents/middleware/implementations/test_shell_execution_policies.py at line 57.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free