Home / Function/ test_startup_command_failure() — langchain Function Reference

test_startup_command_failure() — langchain Function Reference

Architecture documentation for the test_startup_command_failure() function in test_shell_tool.py from the langchain codebase.

Entity Profile

Dependency Diagram

graph TD
  9e0e7046_2a79_5153_a4c3_5584476a8366["test_startup_command_failure()"]
  f21fd460_1d0c_cb92_cfa1_eae0890e2f58["test_shell_tool.py"]
  9e0e7046_2a79_5153_a4c3_5584476a8366 -->|defined in| f21fd460_1d0c_cb92_cfa1_eae0890e2f58
  1bc202d6_8b54_02e9_fadd_ff3171c38a75["_empty_state()"]
  9e0e7046_2a79_5153_a4c3_5584476a8366 -->|calls| 1bc202d6_8b54_02e9_fadd_ff3171c38a75
  style 9e0e7046_2a79_5153_a4c3_5584476a8366 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

libs/langchain_v1/tests/unit_tests/agents/middleware/implementations/test_shell_tool.py lines 325–334

def test_startup_command_failure(tmp_path: Path) -> None:
    """Test that startup command failure raises an error."""
    policy = HostExecutionPolicy(startup_timeout=1.0)
    middleware = ShellToolMiddleware(
        workspace_root=tmp_path / "workspace", startup_commands=("exit 1",), execution_policy=policy
    )
    runtime = Runtime()
    state = _empty_state()
    with pytest.raises(RuntimeError, match=r"Startup command.*failed"):
        middleware.before_agent(state, runtime)

Domain

Subdomains

Frequently Asked Questions

What does test_startup_command_failure() do?
test_startup_command_failure() is a function in the langchain codebase, defined in libs/langchain_v1/tests/unit_tests/agents/middleware/implementations/test_shell_tool.py.
Where is test_startup_command_failure() defined?
test_startup_command_failure() is defined in libs/langchain_v1/tests/unit_tests/agents/middleware/implementations/test_shell_tool.py at line 325.
What does test_startup_command_failure() call?
test_startup_command_failure() calls 1 function(s): _empty_state.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free