Commit 99132051 authored by Berker Peksag's avatar Berker Peksag

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.
parents 9d4f3d81 1b25eff7
...@@ -25,6 +25,11 @@ try: ...@@ -25,6 +25,11 @@ try:
except ImportError: except ImportError:
ssl = None ssl = None
try:
import threading
except ImportError:
threading = None
skipInVenv = unittest.skipIf(sys.prefix != sys.base_prefix, skipInVenv = unittest.skipIf(sys.prefix != sys.base_prefix,
'Test not appropriate in a venv') 'Test not appropriate in a venv')
...@@ -319,6 +324,8 @@ class EnsurePipTest(BaseTest): ...@@ -319,6 +324,8 @@ class EnsurePipTest(BaseTest):
# Requesting pip fails without SSL (http://bugs.python.org/issue19744) # Requesting pip fails without SSL (http://bugs.python.org/issue19744)
@unittest.skipIf(ssl is None, ensurepip._MISSING_SSL_MESSAGE) @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): def test_with_pip(self):
rmtree(self.env_dir) rmtree(self.env_dir)
with EnvironmentVarGuard() as envvars: with EnvironmentVarGuard() as envvars:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment