diff --git a/Lib/test/test_imp.py b/Lib/test/test_imp.py index 3a3059e1619..1e04f5ad0c1 100644 --- a/Lib/test/test_imp.py +++ b/Lib/test/test_imp.py @@ -85,10 +85,16 @@ def test_reload(self): def test_main(): - support.run_unittest( - LockTests, - ImportTests, - ) + tests = [ + ImportTests, + ] + try: + import _thread + except ImportError: + pass + else: + tests.append(LockTests) + support.run_unittest(*tests) if __name__ == "__main__": test_main()