test_retrying_timeout_errors_doesnt_leak() — anthropic-sdk-python Function Reference
Architecture documentation for the test_retrying_timeout_errors_doesnt_leak() function in test_client.py from the anthropic-sdk-python codebase.
Entity Profile
Dependency Diagram
graph TD ad041f22_e636_0478_448a_2c9d549ef106["test_retrying_timeout_errors_doesnt_leak()"] d53b6c34_1743_a045_4be1_3554ab153964["TestAnthropic"] ad041f22_e636_0478_448a_2c9d549ef106 -->|defined in| d53b6c34_1743_a045_4be1_3554ab153964 25054da4_816c_4fb6_7cdb_ff275927e64a["test_retrying_timeout_errors_doesnt_leak()"] 25054da4_816c_4fb6_7cdb_ff275927e64a -->|calls| ad041f22_e636_0478_448a_2c9d549ef106 25054da4_816c_4fb6_7cdb_ff275927e64a["test_retrying_timeout_errors_doesnt_leak()"] ad041f22_e636_0478_448a_2c9d549ef106 -->|calls| 25054da4_816c_4fb6_7cdb_ff275927e64a 1555a14d_ad31_ef11_8c05_4240241d1d97["_get_open_connections()"] ad041f22_e636_0478_448a_2c9d549ef106 -->|calls| 1555a14d_ad31_ef11_8c05_4240241d1d97 style ad041f22_e636_0478_448a_2c9d549ef106 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
tests/test_client.py lines 872–887
def test_retrying_timeout_errors_doesnt_leak(self, respx_mock: MockRouter, client: Anthropic) -> None:
respx_mock.post("/v1/messages").mock(side_effect=httpx.TimeoutException("Test timeout error"))
with pytest.raises(APITimeoutError):
client.messages.with_streaming_response.create(
max_tokens=1024,
messages=[
{
"content": "Hello, world",
"role": "user",
}
],
model="claude-opus-4-6",
).__enter__()
assert _get_open_connections(client) == 0
Domain
Subdomains
Defined In
Source
Frequently Asked Questions
What does test_retrying_timeout_errors_doesnt_leak() do?
test_retrying_timeout_errors_doesnt_leak() is a function in the anthropic-sdk-python codebase, defined in tests/test_client.py.
Where is test_retrying_timeout_errors_doesnt_leak() defined?
test_retrying_timeout_errors_doesnt_leak() is defined in tests/test_client.py at line 872.
What does test_retrying_timeout_errors_doesnt_leak() call?
test_retrying_timeout_errors_doesnt_leak() calls 2 function(s): _get_open_connections, test_retrying_timeout_errors_doesnt_leak.
What calls test_retrying_timeout_errors_doesnt_leak()?
test_retrying_timeout_errors_doesnt_leak() is called by 1 function(s): test_retrying_timeout_errors_doesnt_leak.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free