(server)
| 35 | |
| 36 | @pytest.mark.anyio |
| 37 | async 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 |