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

Method test_request_timeout

tests/test_client.py:381–388  ·  view source on GitHub ↗
(self, client: Anthropic)

Source from the content-addressed store, hash-verified

379 raise AssertionError()
380
381 def test_request_timeout(self, client: Anthropic) -> None:
382 request = client._build_request(FinalRequestOptions(method="get", url="/foo"))
383 timeout = httpx2.Timeout(**request.extensions["timeout"]) # type: ignore
384 assert timeout == DEFAULT_TIMEOUT
385
386 request = client._build_request(FinalRequestOptions(method="get", url="/foo", timeout=httpx2.Timeout(100.0)))
387 timeout = httpx2.Timeout(**request.extensions["timeout"]) # type: ignore
388 assert timeout == httpx2.Timeout(100.0)
389
390 def test_client_timeout_option(self) -> None:
391 client = Anthropic(

Callers

nothing calls this directly

Calls 2

FinalRequestOptionsClass · 0.90
_build_requestMethod · 0.80

Tested by

no test coverage detected