summaryrefslogtreecommitdiffstats
path: root/Lib/test
diff options
context:
space:
mode:
authorRichard Oudkerk <shibturn@gmail.com>2013-10-28 23:23:04 (GMT)
committerRichard Oudkerk <shibturn@gmail.com>2013-10-28 23:23:04 (GMT)
commit33aaa73cade0acee374139f855af2a167d139d89 (patch)
treeac8f49ff500cd706744d490c86f83f48f6e77b0e /Lib/test
parente6514f533efba25e5aeba50208515d02d528995a (diff)
parente90cedb71102c78b93839fd282f53c618defc023 (diff)
downloadcpython-33aaa73cade0acee374139f855af2a167d139d89.zip
cpython-33aaa73cade0acee374139f855af2a167d139d89.tar.gz
cpython-33aaa73cade0acee374139f855af2a167d139d89.tar.bz2
Merge.
Diffstat (limited to 'Lib/test')
-rw-r--r--Lib/test/_test_multiprocessing.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/Lib/test/_test_multiprocessing.py b/Lib/test/_test_multiprocessing.py
index eead142..f12a5f9 100644
--- a/Lib/test/_test_multiprocessing.py
+++ b/Lib/test/_test_multiprocessing.py
@@ -1698,6 +1698,16 @@ class _TestPool(BaseTestCase):
self.assertEqual(2, len(call_args))
self.assertIsInstance(call_args[1], ValueError)
+ def test_map_unplicklable(self):
+ # Issue #19425 -- failure to pickle should not cause a hang
+ if self.TYPE == 'threads':
+ return
+ class A(object):
+ def __reduce__(self):
+ raise RuntimeError('cannot pickle')
+ with self.assertRaises(RuntimeError):
+ self.pool.map(sqr, [A()]*10)
+
def test_map_chunksize(self):
try:
self.pool.map_async(sqr, [], chunksize=1).get(timeout=TIMEOUT1)