From bd1d12e61b1670b6a48ca2d3b06834f8929d70b2 Mon Sep 17 00:00:00 2001 From: Benjamin Peterson Date: Tue, 14 Jan 2014 00:27:42 -0500 Subject: add test for #20251 --- Lib/test/test_socket.py | 7 +++++++ 1 file changed, 7 insertions(+) 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 -- cgit v0.12