Commit bc6469f7 authored by Victor Stinner's avatar Victor Stinner Committed by GitHub

bpo-37153: test_venv.test_mutiprocessing() calls pool.terminate() (GH-13816)

test_venv.test_mutiprocessing() now explicitly calls pool.terminate()
to wait until the pool completes.
parent 8d0ef0b5
......@@ -325,8 +325,10 @@ class BasicTest(BaseTest):
envpy = os.path.join(os.path.realpath(self.env_dir),
self.bindir, self.exe)
out, err = check_output([envpy, '-c',
'from multiprocessing import Pool; ' +
'print(Pool(1).apply_async("Python".lower).get(3))'])
'from multiprocessing import Pool; '
'pool = Pool(1); '
'print(pool.apply_async("Python".lower).get(3)); '
'pool.terminate()'])
self.assertEqual(out.strip(), "python".encode())
@requireVenvCreate
......
``test_venv.test_mutiprocessing()`` now explicitly calls
``pool.terminate()`` to wait until the pool completes.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment