From: Brett Cannon Date: Sat, 18 Dec 2004 21:06:55 +0000 (+0000) Subject: Skip test_imp if threading is not available. X-Git-Tag: v2.5a0~2246 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=94eaee6d49a12b6f332747b53780146027072a57;p=thirdparty%2FPython%2Fcpython.git Skip test_imp if threading is not available. Closes bug #1083645. Thanks Detlef Vollmann. --- diff --git a/Lib/test/test_imp.py b/Lib/test/test_imp.py index 9b7e3b79e6b5..893ba2461711 100644 --- a/Lib/test/test_imp.py +++ b/Lib/test/test_imp.py @@ -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: