Skip to content

Commit b7c67c4

Browse files
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 388c8c2) Co-authored-by: Victor Stinner <vstinner@redhat.com>
1 parent f740818 commit b7c67c4

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

Lib/test/_test_multiprocessing.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2465,6 +2465,7 @@ def test_context(self):
24652465
with self.Pool(2) as p:
24662466
r = p.map_async(sqr, L)
24672467
self.assertEqual(r.get(), expected)
2468+
p.join()
24682469
self.assertRaises(ValueError, p.map_async, sqr, L)
24692470

24702471
@classmethod
@@ -2482,6 +2483,7 @@ def test_traceback(self):
24822483
exc = e
24832484
else:
24842485
self.fail('expected RuntimeError')
2486+
p.join()
24852487
self.assertIs(type(exc), RuntimeError)
24862488
self.assertEqual(exc.args, (123,))
24872489
cause = exc.__cause__
@@ -2506,6 +2508,7 @@ def test_traceback(self):
25062508
self.fail('expected SayWhenError')
25072509
self.assertIs(type(exc), SayWhenError)
25082510
self.assertIs(exc.__cause__, None)
2511+
p.join()
25092512

25102513
@classmethod
25112514
def _test_wrapped_exception(cls):

0 commit comments

Comments
 (0)