summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_imp.py
diff options
context:
space:
mode:
authorBrett Cannon <bcannon@gmail.com>2004-12-18 21:08:11 (GMT)
committerBrett Cannon <bcannon@gmail.com>2004-12-18 21:08:11 (GMT)
commit7f3535678c3a2d48607389a737ce0e25ccda2dcc (patch)
treeeef61044ec21bea7e9cb14078e378e4148f87da0 /Lib/test/test_imp.py
parent1c01c57399d6b5e111bb3b03365e5d43c7541553 (diff)
downloadcpython-7f3535678c3a2d48607389a737ce0e25ccda2dcc.zip
cpython-7f3535678c3a2d48607389a737ce0e25ccda2dcc.tar.gz
cpython-7f3535678c3a2d48607389a737ce0e25ccda2dcc.tar.bz2
Backport fix for bug #1083645 have test_imp be skipped if threading is not
available.
Diffstat (limited to 'Lib/test/test_imp.py')
-rw-r--r--Lib/test/test_imp.py6
1 files changed, 5 insertions, 1 deletions
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: