MCPcopy
hub / github.com/openai/openai-python / test_request_timeout

Method test_request_timeout

tests/test_client.py:335–342  ·  view source on GitHub ↗
(self, client: OpenAI)

Source from the content-addressed store, hash-verified

333 raise AssertionError()
334
335 def test_request_timeout(self, client: OpenAI) -> None:
336 request = client._build_request(FinalRequestOptions(method="get", url="/foo"))
337 timeout = httpx.Timeout(**request.extensions["timeout"]) # type: ignore
338 assert timeout == DEFAULT_TIMEOUT
339
340 request = client._build_request(FinalRequestOptions(method="get", url="/foo", timeout=httpx.Timeout(100.0)))
341 timeout = httpx.Timeout(**request.extensions["timeout"]) # type: ignore
342 assert timeout == httpx.Timeout(100.0)
343
344 def test_client_timeout_option(self) -> None:
345 client = OpenAI(

Callers

nothing calls this directly

Calls 2

FinalRequestOptionsClass · 0.90
_build_requestMethod · 0.45

Tested by

no test coverage detected