MCPcopy
hub / github.com/urllib3/urllib3 / test_base_io

Method test_base_io

test/test_response.py:998–1015  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

996
997 @pytest.mark.filterwarnings("ignore::pytest.PytestUnraisableExceptionWarning")
998 def test_base_io(self) -> None:
999 resp = BaseHTTPResponse(
1000 status=200,
1001 version=11,
1002 version_string="HTTP/1.1",
1003 reason=None,
1004 decode_content=False,
1005 request_url=None,
1006 )
1007
1008 assert not resp.closed
1009 assert not resp.readable()
1010 assert not resp.writable()
1011
1012 with pytest.raises(NotImplementedError):
1013 resp.read()
1014 with pytest.raises(NotImplementedError):
1015 resp.close()
1016
1017 def test_io(self, sock: socket.socket) -> None:
1018 fp = BytesIO(b"foo")

Callers

nothing calls this directly

Calls 5

readMethod · 0.95
closeMethod · 0.95
BaseHTTPResponseClass · 0.90
readableMethod · 0.45
writableMethod · 0.45

Tested by

no test coverage detected