]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Backport of fix for bug #1083645; skip test_imp if threading is not available.
authorBrett Cannon <bcannon@gmail.com>
Sat, 18 Dec 2004 21:09:04 +0000 (21:09 +0000)
committerBrett Cannon <bcannon@gmail.com>
Sat, 18 Dec 2004 21:09:04 +0000 (21:09 +0000)
Lib/test/test_imp.py

index 9b7e3b79e6b53e1b8c29d1e11539cf447b468a07..893ba24617119f313df78e8299cb41f45ba12297 100644 (file)
@@ -1,5 +1,9 @@
 import imp
-from test.test_support import TestFailed
+from test.test_support import TestFailed, TestSkipped
+try:
+    import thread
+except ImportError:
+    raise TestSkipped("test only valid when thread support is available")
 
 def verify_lock_state(expected):
     if imp.lock_held() != expected: