summaryrefslogtreecommitdiff
path: root/Lib/test/test_socket.py
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2014-01-14 00:27:42 -0500
committerBenjamin Peterson <benjamin@python.org>2014-01-14 00:27:42 -0500
commitd93d6332ee6fc74e0da337895780af0b000ee450 (patch)
tree78139ceae7fdb93a8cbee4f192e53fab2afdd52a /Lib/test/test_socket.py
parent9e79889184a3da2aa113b78967d44a2bd13a0fa6 (diff)
downloadcpython-git-d93d6332ee6fc74e0da337895780af0b000ee450.tar.gz
add test for #20251
Diffstat (limited to 'Lib/test/test_socket.py')
-rw-r--r--Lib/test/test_socket.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/Lib/test/test_socket.py b/Lib/test/test_socket.py
index c7ad1217e4..0bce1b4b9a 100644
--- a/Lib/test/test_socket.py
+++ b/Lib/test/test_socket.py
@@ -1630,6 +1630,13 @@ class BufferIOTest(SocketConnectedTest):
buf = buffer(MSG*2048)
self.serv_conn.send(buf)
+ def testRecvFromIntoEmptyBuffer(self):
+ buf = bytearray()
+ self.cli_conn.recvfrom_into(buf)
+ self.cli_conn.recvfrom_into(buf, 0)
+
+ _testRecvFromIntoEmptyBuffer = _testRecvFromIntoArray
+
TIPC_STYPE = 2000
TIPC_LOWER = 200