Commits

Anonymous committed 23b452a

Issue #3806: LockTests in test_imp should be skipped when thread is not available.
Reviewed by Benjamin Peterson.

  • Participants
  • Parent commits 973bdb2
  • Branches legacy-trunk

Comments (0)

Files changed (1)

File Lib/test/test_imp.py

 
 
 def test_main():
-    test_support.run_unittest(
-                LockTests,
-                ReloadTests,
-            )
+    tests = [
+        ReloadTests,
+    ]
+    try:
+        import thread
+    except ImportError:
+        pass
+    else:
+        tests.append(LockTests)
+    test_support.run_unittest(*tests)
 
 if __name__ == "__main__":
     test_main()