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

Function test_cannot_aread_after_response_closed

tests/models/test_responses.py:758–766  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

756
757@pytest.mark.anyio
758async def test_cannot_aread_after_response_closed():
759 response = httpx.Response(
760 200,
761 content=async_streaming_body(),
762 )
763
764 await response.aclose()
765 with pytest.raises(httpx.StreamClosed):
766 await response.aread()
767
768
769@pytest.mark.anyio

Callers

nothing calls this directly

Calls 3

acloseMethod · 0.95
areadMethod · 0.95
async_streaming_bodyFunction · 0.85

Tested by

no test coverage detected