diff options
Diffstat (limited to 'Lib/test/test_imp.py')
-rw-r--r-- | Lib/test/test_imp.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/Lib/test/test_imp.py b/Lib/test/test_imp.py index 77e44be..1bdc47a 100644 --- a/Lib/test/test_imp.py +++ b/Lib/test/test_imp.py @@ -2,7 +2,12 @@ import imp import unittest from test import test_support +try: + import thread +except ImportError: + thread = None +@unittest.skipUnless(thread, 'threading not available') class LockTests(unittest.TestCase): """Very basic test of import lock functions.""" @@ -68,13 +73,8 @@ class ReloadTests(unittest.TestCase): def test_main(): tests = [ ReloadTests, + LockTests, ] - try: - import thread - except ImportError: - pass - else: - tests.append(LockTests) test_support.run_unittest(*tests) if __name__ == "__main__": |