]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Backport fix for bug #1083645 have test_imp be skipped if threading is not
authorBrett Cannon <bcannon@gmail.com>
Sat, 18 Dec 2004 21:08:11 +0000 (21:08 +0000)
committerBrett Cannon <bcannon@gmail.com>
Sat, 18 Dec 2004 21:08:11 +0000 (21:08 +0000)
available.

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: