[Python-checkins] bpo-35424: test_multiprocessing: join 3 pools (GH-10986)

Miss Islington (bot) webhook-mailer at python.org
Thu Dec 6 06:20:55 EST 2018


https://github.com/python/cpython/commit/b7c67c4d510a7a72a35983cc168dbb2ce796cb8c
commit: b7c67c4d510a7a72a35983cc168dbb2ce796cb8c
branch: 3.7
author: Miss Islington (bot) <31488909+miss-islington at users.noreply.github.com>
committer: GitHub <noreply at github.com>
date: 2018-12-06T03:20:50-08:00
summary:

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 at redhat.com>

files:
M Lib/test/_test_multiprocessing.py

diff --git a/Lib/test/_test_multiprocessing.py b/Lib/test/_test_multiprocessing.py
index a0daa43a55a1..abcb5d45e7ab 100644
--- a/Lib/test/_test_multiprocessing.py
+++ b/Lib/test/_test_multiprocessing.py
@@ -2465,6 +2465,7 @@ def test_context(self):
             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
@@ -2482,6 +2483,7 @@ def test_traceback(self):
                     exc = e
                 else:
                     self.fail('expected RuntimeError')
+            p.join()
             self.assertIs(type(exc), RuntimeError)
             self.assertEqual(exc.args, (123,))
             cause = exc.__cause__
@@ -2506,6 +2508,7 @@ def test_traceback(self):
                     self.fail('expected SayWhenError')
                 self.assertIs(type(exc), SayWhenError)
                 self.assertIs(exc.__cause__, None)
+            p.join()
 
     @classmethod
     def _test_wrapped_exception(cls):



More information about the Python-checkins mailing list