summaryrefslogtreecommitdiffstats
path: root/Lib/test
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2014-01-14 05:27:42 (GMT)
committerBenjamin Peterson <benjamin@python.org>2014-01-14 05:27:42 (GMT)
commitbd1d12e61b1670b6a48ca2d3b06834f8929d70b2 (patch)
tree5381f51c1543e9078fc69aba654720fc73622a6e /Lib/test
parenta677d7628b7a0f57c49069bf82306819b68775ae (diff)
downloadcpython-bd1d12e61b1670b6a48ca2d3b06834f8929d70b2.zip
cpython-bd1d12e61b1670b6a48ca2d3b06834f8929d70b2.tar.gz
cpython-bd1d12e61b1670b6a48ca2d3b06834f8929d70b2.tar.bz2
add test for #20251
Diffstat (limited to 'Lib/test')
-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 2df6dd6..ce3c16c 100644
--- a/Lib/test/test_socket.py
+++ b/Lib/test/test_socket.py
@@ -4546,6 +4546,13 @@ class BufferIOTest(SocketConnectedTest):
def _testRecvFromIntoSmallBuffer(self):
self.serv_conn.send(MSG*2048)
+ 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