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

Function test_cannot_read_after_response_closed

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

Source from the content-addressed store, hash-verified

744
745
746def test_cannot_read_after_response_closed():
747 response = httpx.Response(
748 200,
749 content=streaming_body(),
750 )
751
752 response.close()
753 with pytest.raises(httpx.StreamClosed):
754 response.read()
755
756
757@pytest.mark.anyio

Callers

nothing calls this directly

Calls 3

closeMethod · 0.95
readMethod · 0.95
streaming_bodyFunction · 0.70

Tested by

no test coverage detected