summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_venv.py
diff options
context:
space:
mode:
authorBerker Peksag <berker.peksag@gmail.com>2016-01-19 00:01:53 (GMT)
committerBerker Peksag <berker.peksag@gmail.com>2016-01-19 00:01:53 (GMT)
commit1b25eff76e2601626b9784c6366ebfc3c7f99235 (patch)
treea263ba1015d665d9b4d8cec5771f5c96852c654c /Lib/test/test_venv.py
parent5c1d9d2ff7ac50a65fb3053549b7897c5162d83e (diff)
downloadcpython-1b25eff76e2601626b9784c6366ebfc3c7f99235.zip
cpython-1b25eff76e2601626b9784c6366ebfc3c7f99235.tar.gz
cpython-1b25eff76e2601626b9784c6366ebfc3c7f99235.tar.bz2
Issue #25366: Skip test_with_pip when threading module is not available
Some dependencies of pip import threading module unconditionally so we need to skip the test to make buildbots happy.
Diffstat (limited to 'Lib/test/test_venv.py')
-rw-r--r--Lib/test/test_venv.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/Lib/test/test_venv.py b/Lib/test/test_venv.py
index 9207a68..28b0f6c 100644
--- a/Lib/test/test_venv.py
+++ b/Lib/test/test_venv.py
@@ -25,6 +25,11 @@ try:
except ImportError:
ssl = None
+try:
+ import threading
+except ImportError:
+ threading = None
+
skipInVenv = unittest.skipIf(sys.prefix != sys.base_prefix,
'Test not appropriate in a venv')
@@ -319,6 +324,8 @@ class EnsurePipTest(BaseTest):
# Requesting pip fails without SSL (http://bugs.python.org/issue19744)
@unittest.skipIf(ssl is None, ensurepip._MISSING_SSL_MESSAGE)
+ @unittest.skipUnless(threading, 'some dependencies of pip import threading'
+ ' module unconditionally')
def test_with_pip(self):
rmtree(self.env_dir)
with EnvironmentVarGuard() as envvars: