Mercurial > cpython-lru_cache-weakref
diff Lib/test/test_socket.py @ 48623:bf50085fbcd3
#2538: bytes objects can only provide read-only buffers
| author | Antoine Pitrou <solipsis@pitrou.net> |
|---|---|
| date | Sat, 02 Aug 2008 21:02:48 +0000 |
| parents | 045f83a1b864 |
| children | 5ffd67df8c9f |
line wrap: on
line diff
--- a/Lib/test/test_socket.py Sat Aug 02 16:34:27 2008 +0000 +++ b/Lib/test/test_socket.py Sat Aug 02 21:02:48 2008 +0000 @@ -1112,7 +1112,7 @@ SocketConnectedTest.__init__(self, methodName=methodName) def testRecvInto(self): - buf = b" "*1024 + buf = bytearray(1024) nbytes = self.cli_conn.recv_into(buf) self.assertEqual(nbytes, len(MSG)) msg = buf[:len(MSG)] @@ -1123,7 +1123,7 @@ self.serv_conn.send(buf) def testRecvFromInto(self): - buf = b" "*1024 + buf = bytearray(1024) nbytes, addr = self.cli_conn.recvfrom_into(buf) self.assertEqual(nbytes, len(MSG)) msg = buf[:len(MSG)]
