MCPcopy
hub / github.com/encode/httpx / test_pool_timeout

Function test_pool_timeout

tests/test_timeouts.py:37–44  ·  view source on GitHub ↗
(server)

Source from the content-addressed store, hash-verified

35
36@pytest.mark.anyio
37async def test_pool_timeout(server):
38 limits = httpx.Limits(max_connections=1)
39 timeout = httpx.Timeout(None, pool=1e-4)
40
41 async with httpx.AsyncClient(limits=limits, timeout=timeout) as client:
42 with pytest.raises(httpx.PoolTimeout):
43 async with client.stream("GET", server.url):
44 await client.get(server.url)
45
46
47@pytest.mark.anyio

Callers

nothing calls this directly

Calls 2

streamMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected