diff options
author | xdegaye <xdegaye@gmail.com> | 2019-05-30 21:42:29 (GMT) |
---|---|---|
committer | Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> | 2019-05-30 21:42:29 (GMT) |
commit | 5437ccca1424e415a938c583df43d8cc74047d16 (patch) | |
tree | a0efd6e77d77fce636c58f9a927d0e9a2206a554 /Lib | |
parent | 2f5b9dcc0a89cbde1499c76df81c36bfd5ef9aa8 (diff) | |
download | cpython-5437ccca1424e415a938c583df43d8cc74047d16.zip cpython-5437ccca1424e415a938c583df43d8cc74047d16.tar.gz cpython-5437ccca1424e415a938c583df43d8cc74047d16.tar.bz2 |
bpo-36342: Fix test_multiprocessing in test_venv (GH-12513)
when platform lacks a functioning sem_open implementation
https://bugs.python.org/issue36342
Diffstat (limited to 'Lib')
-rw-r--r-- | Lib/test/test_venv.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/Lib/test/test_venv.py b/Lib/test/test_venv.py index 6822d56..278c686 100644 --- a/Lib/test/test_venv.py +++ b/Lib/test/test_venv.py @@ -14,7 +14,8 @@ import subprocess import sys import tempfile from test.support import (captured_stdout, captured_stderr, requires_zlib, - can_symlink, EnvironmentVarGuard, rmtree) + can_symlink, EnvironmentVarGuard, rmtree, + import_module) import threading import unittest import venv @@ -315,6 +316,10 @@ class BasicTest(BaseTest): """ Test that the multiprocessing is able to spawn. """ + # Issue bpo-36342: Instanciation of a Pool object imports the + # multiprocessing.synchronize module. Skip the test if this module + # cannot be imported. + import_module('multiprocessing.synchronize') rmtree(self.env_dir) self.run_with_capture(venv.create, self.env_dir) envpy = os.path.join(os.path.realpath(self.env_dir), |