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