Skip to content

Commit b068b72

Browse files
committed
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.
1 parent 6ff3216 commit b068b72

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

Lib/test/test_venv.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,11 @@
2525
except ImportError:
2626
ssl = None
2727

28+
try:
29+
import threading
30+
except ImportError:
31+
threading = None
32+
2833
skipInVenv = unittest.skipIf(sys.prefix != sys.base_prefix,
2934
'Test not appropriate in a venv')
3035

@@ -319,6 +324,8 @@ def test_devnull_exists_and_is_empty(self):
319324

320325
# Requesting pip fails without SSL (http://bugs.python.org/issue19744)
321326
@unittest.skipIf(ssl is None, ensurepip._MISSING_SSL_MESSAGE)
327+
@unittest.skipUnless(threading, 'some dependencies of pip import threading'
328+
' module unconditionally')
322329
def test_with_pip(self):
323330
rmtree(self.env_dir)
324331
with EnvironmentVarGuard() as envvars:

0 commit comments

Comments
 (0)