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

Function _get_open_connections

tests/test_client.py:107–112  ·  view source on GitHub ↗
(client: Anthropic | AsyncAnthropic)

Source from the content-addressed store, hash-verified

105
106
107def _get_open_connections(client: Anthropic | AsyncAnthropic) -> int:
108 transport = client._client._transport
109 assert isinstance(transport, httpx.HTTPTransport) or isinstance(transport, httpx.AsyncHTTPTransport)
110
111 pool = transport._pool
112 return len(pool._requests)
113
114
115@pytest.mark.parametrize("status_code", [400, 401, 403, 404, 409, 413, 422, 429, 500, 503, 529])

Calls

no outgoing calls

Tested by

no test coverage detected