diff options
author | Richard Oudkerk <shibturn@gmail.com> | 2012-04-30 13:48:50 (GMT) |
---|---|---|
committer | Richard Oudkerk <shibturn@gmail.com> | 2012-04-30 13:48:50 (GMT) |
commit | 4460c3476d9099d0e05db8a763053c973d2d8be8 (patch) | |
tree | 741cc75f6bc55750673a6a21cb0e278ca66ace6c /Lib | |
parent | 3e268aac3b1b3c89925b59dae7a213b94bc114b8 (diff) | |
download | cpython-4460c3476d9099d0e05db8a763053c973d2d8be8.zip cpython-4460c3476d9099d0e05db8a763053c973d2d8be8.tar.gz cpython-4460c3476d9099d0e05db8a763053c973d2d8be8.tar.bz2 |
Minor fix for multiprocessing unit test
Read from socket might have returned partial message.
Diffstat (limited to 'Lib')
-rw-r--r-- | Lib/test/test_multiprocessing.py | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/Lib/test/test_multiprocessing.py b/Lib/test/test_multiprocessing.py index 799be70..089b76f 100644 --- a/Lib/test/test_multiprocessing.py +++ b/Lib/test/test_multiprocessing.py @@ -2034,7 +2034,14 @@ class _TestPicklingConnections(BaseTestCase): address = lconn.recv() rconn.send((address, msg)) new_conn = lconn.recv() - self.assertEqual(new_conn.recv(100), msg.upper()) + buf = [] + while True: + s = new_conn.recv(100) + if not s: + break + buf.append(s) + buf = b''.join(buf) + self.assertEqual(buf, msg.upper()) new_conn.close() lconn.send(None) |