diff options
Diffstat (limited to 'Lib/test/test_socket.py')
-rw-r--r-- | Lib/test/test_socket.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/Lib/test/test_socket.py b/Lib/test/test_socket.py index 6a9497bc7d..c242a57991 100644 --- a/Lib/test/test_socket.py +++ b/Lib/test/test_socket.py @@ -1424,6 +1424,14 @@ class BufferIOTest(SocketConnectedTest): buf = bytes(MSG) self.serv_conn.send(buf) + def testRecvFromIntoSmallBuffer(self): + # See issue #20246. + buf = bytearray(8) + self.assertRaises(ValueError, self.cli_conn.recvfrom_into, buf, 1024) + + def _testRecvFromIntoSmallBuffer(self): + self.serv_conn.send(MSG*2048) + TIPC_STYPE = 2000 TIPC_LOWER = 200 |