]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Issue #25366: Skip test_with_pip when threading module is not available
authorBerker Peksag <berker.peksag@gmail.com>
Tue, 19 Jan 2016 00:01:53 +0000 (02:01 +0200)
committerBerker Peksag <berker.peksag@gmail.com>
Tue, 19 Jan 2016 00:01:53 +0000 (02:01 +0200)
Some dependencies of pip import threading module unconditionally so
we need to skip the test to make buildbots happy.

Lib/test/test_venv.py

index 9207a685ab83eec0fca3b89b63e3f793bd894d4c..28b0f6c3e3d26f8725bb9b725930366f216a5d98 100644 (file)
@@ -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: