summaryrefslogtreecommitdiff
path: root/Lib/test/test_capi.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/test/test_capi.py')
-rw-r--r--Lib/test/test_capi.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/Lib/test/test_capi.py b/Lib/test/test_capi.py
index 107d4b4276..87be9ee775 100644
--- a/Lib/test/test_capi.py
+++ b/Lib/test/test_capi.py
@@ -16,9 +16,6 @@ def test_main():
# some extra thread-state tests driven via _testcapi
def TestThreadState():
- import thread
- import time
-
if test_support.verbose:
print("auto-thread-state")
@@ -42,6 +39,8 @@ def test_main():
have_thread_state = False
if have_thread_state:
+ import thread
+ import time
TestThreadState()
import threading
t=threading.Thread(target=TestThreadState)