mirror of https://github.com/python/cpython.git
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.
This commit is contained in:
parent
8d0ef0b5ed
commit
bc6469f79c
|
@ -325,8 +325,10 @@ def test_multiprocessing(self):
|
|||
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
|
||||
|
|
|
@ -0,0 +1,2 @@
|
|||
``test_venv.test_mutiprocessing()`` now explicitly calls
|
||||
``pool.terminate()`` to wait until the pool completes.
|
Loading…
Reference in New Issue