summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_socket.py
diff options
context:
space:
mode:
authorMartin Blais <blais@furius.ca>2006-06-04 13:49:49 (GMT)
committerMartin Blais <blais@furius.ca>2006-06-04 13:49:49 (GMT)
commitaf2ae72cb20e853091faad0dd11d51e97539881d (patch)
tree218d426ffb6408a97dcf7ff2055cc4b28476b1b5 /Lib/test/test_socket.py
parent63f0db682e00d051466e5d739ba85f2a30279eef (diff)
downloadcpython-af2ae72cb20e853091faad0dd11d51e97539881d.zip
cpython-af2ae72cb20e853091faad0dd11d51e97539881d.tar.gz
cpython-af2ae72cb20e853091faad0dd11d51e97539881d.tar.bz2
Fixes in struct and socket from merge reviews.
- Following Guido's comments, renamed * pack_to -> pack_into * recv_buf -> recv_into * recvfrom_buf -> recvfrom_into - Made fixes to _struct.c according to Neal Norwitz comments on the checkins list. - Converted some ints into the appropriate -- I hope -- ssize_t and size_t.
Diffstat (limited to 'Lib/test/test_socket.py')
-rw-r--r--Lib/test/test_socket.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/Lib/test/test_socket.py b/Lib/test/test_socket.py
index 2246fb6..01b9b5b 100644
--- a/Lib/test/test_socket.py
+++ b/Lib/test/test_socket.py
@@ -860,25 +860,25 @@ class BufferIOTest(SocketConnectedTest):
def __init__(self, methodName='runTest'):
SocketConnectedTest.__init__(self, methodName=methodName)
- def testRecvBuf(self):
+ def testRecvInto(self):
buf = array.array('c', ' '*1024)
- nbytes = self.cli_conn.recv_buf(buf)
+ nbytes = self.cli_conn.recv_into(buf)
self.assertEqual(nbytes, len(MSG))
msg = buf.tostring()[:len(MSG)]
self.assertEqual(msg, MSG)
- def _testRecvBuf(self):
+ def _testRecvInto(self):
buf = buffer(MSG)
self.serv_conn.send(buf)
- def testRecvFromBuf(self):
+ def testRecvFromInto(self):
buf = array.array('c', ' '*1024)
- nbytes, addr = self.cli_conn.recvfrom_buf(buf)
+ nbytes, addr = self.cli_conn.recvfrom_into(buf)
self.assertEqual(nbytes, len(MSG))
msg = buf.tostring()[:len(MSG)]
self.assertEqual(msg, MSG)
- def _testRecvFromBuf(self):
+ def _testRecvFromInto(self):
buf = buffer(MSG)
self.serv_conn.send(buf)