From: Benjamin Peterson Date: Tue, 14 Jan 2014 05:27:42 +0000 (-0500) Subject: add test for #20251 X-Git-Tag: v3.3.4rc1~68 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=bd1d12e61b1670b6a48ca2d3b06834f8929d70b2;p=thirdparty%2FPython%2Fcpython.git add test for #20251 --- diff --git a/Lib/test/test_socket.py b/Lib/test/test_socket.py index 2df6dd65210f..ce3c16ca8216 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