mirror of
https://github.com/python/cpython.git
synced 2025-08-30 21:48:47 +00:00
bpo-35797: Fix default executable used by the multiprocessing module (GH-11676)
This commit is contained in:
parent
3bab40db96
commit
4e02f8f8b4
3 changed files with 22 additions and 1 deletions
|
@ -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."""
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue