diff options
author | Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> | 2019-06-04 12:07:03 -0700 |
---|---|---|
committer | Victor Stinner <vstinner@redhat.com> | 2019-06-04 21:07:03 +0200 |
commit | 5f8443eec9d54e1f74b69aa547e6810da6afa90b (patch) | |
tree | f8757b0207a913e1719c3eacf426cd9a0b6d0cd5 /Lib | |
parent | 250b62acc59921d399f0db47db3b462cd6037e09 (diff) | |
download | cpython-git-5f8443eec9d54e1f74b69aa547e6810da6afa90b.tar.gz |
bpo-37153: test_venv.test_mutiprocessing() calls pool.terminate() (GH-13816) (GH-13819)
test_venv.test_mutiprocessing() now explicitly calls pool.terminate()
to wait until the pool completes.
(cherry picked from commit bc6469f79ca13217b784fb47da7ec83484a3debe)
Co-authored-by: Victor Stinner <vstinner@redhat.com>
Diffstat (limited to 'Lib')
-rw-r--r-- | Lib/test/test_venv.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/Lib/test/test_venv.py b/Lib/test/test_venv.py index 19a5aab7a2..a8dc59cb81 100644 --- a/Lib/test/test_venv.py +++ b/Lib/test/test_venv.py @@ -312,8 +312,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 |