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

Function test_write_timeout

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

Source from the content-addressed store, hash-verified

14
15@pytest.mark.anyio
16async def test_write_timeout(server):
17 timeout = httpx.Timeout(None, write=1e-6)
18
19 async with httpx.AsyncClient(timeout=timeout) as client:
20 with pytest.raises(httpx.WriteTimeout):
21 data = b"*" * 1024 * 1024 * 100
22 await client.put(server.url.copy_with(path="/slow_response"), content=data)
23
24
25@pytest.mark.anyio

Callers

nothing calls this directly

Calls 2

putMethod · 0.45
copy_withMethod · 0.45

Tested by

no test coverage detected