bpo-35797: Fix default executable used by the multiprocessing module (GH-11676)

This commit is contained in:
Steve Dower 2019-01-25 14:59:12 -08:00 committed by GitHub
parent 3bab40db96
commit 4e02f8f8b4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 22 additions and 1 deletions

View file

@ -306,6 +306,19 @@ class BasicTest(BaseTest):
)
self.assertEqual(out.strip(), '0')
def test_multiprocessing(self):
"""
Test that the multiprocessing is able to spawn.
"""
rmtree(self.env_dir)
self.run_with_capture(venv.create, self.env_dir)
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))'])
self.assertEqual(out.strip(), "python".encode())
@skipInVenv
class EnsurePipTest(BaseTest):
"""Test venv module installation of pip."""