test_host_policy_requires_resource_for_limits() — langchain Function Reference
Architecture documentation for the test_host_policy_requires_resource_for_limits() function in test_shell_execution_policies.py from the langchain codebase.
Entity Profile
Dependency Diagram
graph TD 28c607c3_c7f7_6df5_45db_80ae1b451821["test_host_policy_requires_resource_for_limits()"] 6b16168d_9880_7f41_060c_9fcd5b337996["test_shell_execution_policies.py"] 28c607c3_c7f7_6df5_45db_80ae1b451821 -->|defined in| 6b16168d_9880_7f41_060c_9fcd5b337996 style 28c607c3_c7f7_6df5_45db_80ae1b451821 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 68–71
def test_host_policy_requires_resource_for_limits(monkeypatch: pytest.MonkeyPatch) -> None:
monkeypatch.setattr(_execution, "_HAS_RESOURCE", False, raising=False)
with pytest.raises(RuntimeError):
HostExecutionPolicy(cpu_time_seconds=1)
Domain
Subdomains
Source
Frequently Asked Questions
What does test_host_policy_requires_resource_for_limits() do?
test_host_policy_requires_resource_for_limits() 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_requires_resource_for_limits() defined?
test_host_policy_requires_resource_for_limits() is defined in libs/langchain_v1/tests/unit_tests/agents/middleware/implementations/test_shell_execution_policies.py at line 68.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free