summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2018-12-06 03:23:20 -0800
committerGitHub <noreply@github.com>2018-12-06 03:23:20 -0800
commite44b5b2afa6fe2966d8caff45e36c0980413bb86 (patch)
treec0e3c25d9937b10ffe39ffac888027d1fbc1ff10
parentf9d8b686285926c985cfe88a8392a9a497c0a916 (diff)
downloadcpython-git-e44b5b2afa6fe2966d8caff45e36c0980413bb86.tar.gz
bpo-35424: test_multiprocessing: join 3 pools (GH-10986)
Join 3 pools in these tests: * test.test_multiprocessing_spawn.WithProcessesTestPool.test_context * test.test_multiprocessing_spawn.WithProcessesTestPool.test_traceback (cherry picked from commit 388c8c208d9d09bd28289c1e4776b947d4d0f0f0) Co-authored-by: Victor Stinner <vstinner@redhat.com>
-rw-r--r--Lib/test/_test_multiprocessing.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/Lib/test/_test_multiprocessing.py b/Lib/test/_test_multiprocessing.py
index 6cafc2e9cb..d5c1ec1284 100644
--- a/Lib/test/_test_multiprocessing.py
+++ b/Lib/test/_test_multiprocessing.py
@@ -2199,6 +2199,7 @@ class _TestPool(BaseTestCase):
with self.Pool(2) as p:
r = p.map_async(sqr, L)
self.assertEqual(r.get(), expected)
+ p.join()
self.assertRaises(ValueError, p.map_async, sqr, L)
@classmethod
@@ -2216,6 +2217,7 @@ class _TestPool(BaseTestCase):
exc = e
else:
self.fail('expected RuntimeError')
+ p.join()
self.assertIs(type(exc), RuntimeError)
self.assertEqual(exc.args, (123,))
cause = exc.__cause__
@@ -2240,6 +2242,7 @@ class _TestPool(BaseTestCase):
self.fail('expected SayWhenError')
self.assertIs(type(exc), SayWhenError)
self.assertIs(exc.__cause__, None)
+ p.join()
@classmethod
def _test_wrapped_exception(cls):