From 7f3535678c3a2d48607389a737ce0e25ccda2dcc Mon Sep 17 00:00:00 2001 From: Brett Cannon Date: Sat, 18 Dec 2004 21:08:11 +0000 Subject: Backport fix for bug #1083645 have test_imp be skipped if threading is not available. --- Lib/test/test_imp.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Lib/test/test_imp.py b/Lib/test/test_imp.py index 9b7e3b7..893ba24 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: -- cgit v0.12