MCPcopy Create free account
hub / github.com/anthropics/anthropic-sdk-python / test_bash_timeout

Function test_bash_timeout

tests/lib/tools/test_agent_toolset.py:940–947  ·  view source on GitHub ↗
(tmp_path: Path)

Source from the content-addressed store, hash-verified

938
939@pytest.mark.skipif(sys.platform == "win32", reason="bash session requires /bin/bash")
940async def test_bash_timeout(tmp_path: Path) -> None:
941 s = await BashSession.start(str(tmp_path))
942 try:
943 with pytest.raises(TimeoutError):
944 await s.exec("sleep 5", timeout=0.2)
945 assert s.closed
946 finally:
947 await s.close()
948
949
950@pytest.mark.skipif(sys.platform == "win32", reason="bash session requires /bin/bash")

Callers

nothing calls this directly

Calls 3

execMethod · 0.80
startMethod · 0.45
closeMethod · 0.45

Tested by

no test coverage detected