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

Function _get_open_connections

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

Source from the content-addressed store, hash-verified

107
108
109def _get_open_connections(client: Anthropic | AsyncAnthropic) -> int:
110 transport = client._client._transport
111 assert isinstance(transport, httpx2.HTTPTransport) or isinstance(transport, httpx2.AsyncHTTPTransport)
112
113 pool = transport._pool
114 return len(pool._requests)
115
116
117@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