[Python-checkins] cpython: Minor fix for multiprocessing unit test
richard.oudkerk
python-checkins at python.org
Mon Apr 30 15:53:06 CEST 2012
http://hg.python.org/cpython/rev/aff7bb5811c3
changeset: 76664:aff7bb5811c3
user: Richard Oudkerk <shibturn at gmail.com>
date: Mon Apr 30 14:48:50 2012 +0100
summary:
Minor fix for multiprocessing unit test
Read from socket might have returned partial message.
files:
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
--- a/Lib/test/test_multiprocessing.py
+++ b/Lib/test/test_multiprocessing.py
@@ -2034,7 +2034,14 @@
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)
--
Repository URL: http://hg.python.org/cpython
More information about the Python-checkins
mailing list