diff options
author | Victor Stinner <vstinner@redhat.com> | 2018-12-06 10:56:52 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-12-06 10:56:52 (GMT) |
commit | 388c8c208d9d09bd28289c1e4776b947d4d0f0f0 (patch) | |
tree | d5451df6848e3ab68a40ff49ef6f4e776d3f1691 /Lib/test/_test_multiprocessing.py | |
parent | 3ffa8b9ba190101f674a0e524e482a83ed09cccd (diff) | |
download | cpython-388c8c208d9d09bd28289c1e4776b947d4d0f0f0.zip cpython-388c8c208d9d09bd28289c1e4776b947d4d0f0f0.tar.gz cpython-388c8c208d9d09bd28289c1e4776b947d4d0f0f0.tar.bz2 |
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
Diffstat (limited to 'Lib/test/_test_multiprocessing.py')
-rw-r--r-- | Lib/test/_test_multiprocessing.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/Lib/test/_test_multiprocessing.py b/Lib/test/_test_multiprocessing.py index 163419c..0b0fe7c 100644 --- a/Lib/test/_test_multiprocessing.py +++ b/Lib/test/_test_multiprocessing.py @@ -2471,6 +2471,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 @@ -2488,6 +2489,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__ @@ -2512,6 +2514,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): |