Skip to content

Commit 388c8c2

Browse files
authored
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
1 parent 3ffa8b9 commit 388c8c2

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
@@ -2471,6 +2471,7 @@ def test_context(self):
24712471
with self.Pool(2) as p:
24722472
r = p.map_async(sqr, L)
24732473
self.assertEqual(r.get(), expected)
2474+
p.join()
24742475
self.assertRaises(ValueError, p.map_async, sqr, L)
24752476

24762477
@classmethod
@@ -2488,6 +2489,7 @@ def test_traceback(self):
24882489
exc = e
24892490
else:
24902491
self.fail('expected RuntimeError')
2492+
p.join()
24912493
self.assertIs(type(exc), RuntimeError)
24922494
self.assertEqual(exc.args, (123,))
24932495
cause = exc.__cause__
@@ -2512,6 +2514,7 @@ def test_traceback(self):
25122514
self.fail('expected SayWhenError')
25132515
self.assertIs(type(exc), SayWhenError)
25142516
self.assertIs(exc.__cause__, None)
2517+
p.join()
25152518

25162519
@classmethod
25172520
def _test_wrapped_exception(cls):

0 commit comments

Comments
 (0)