bpo-40275: Adding threading_helper submodule in test.support (GH-20263)
diff --git a/Lib/test/test_threadsignals.py b/Lib/test/test_threadsignals.py
index eeacd36..15e8078 100644
--- a/Lib/test/test_threadsignals.py
+++ b/Lib/test/test_threadsignals.py
@@ -5,6 +5,7 @@
import os
import sys
from test import support
+from test.support import threading_helper
import _thread as thread
import time
@@ -39,7 +40,7 @@
class ThreadSignals(unittest.TestCase):
def test_signals(self):
- with support.wait_threads_exit():
+ with threading_helper.wait_threads_exit():
# Test signal handling semantics of threads.
# We spawn a thread, have the thread send two signals, and
# wait for it to finish. Check that we got both signals
@@ -129,7 +130,7 @@
def other_thread():
rlock.acquire()
- with support.wait_threads_exit():
+ with threading_helper.wait_threads_exit():
thread.start_new_thread(other_thread, ())
# Wait until we can't acquire it without blocking...
while rlock.acquire(blocking=False):
@@ -165,7 +166,7 @@
time.sleep(0.5)
lock.release()
- with support.wait_threads_exit():
+ with threading_helper.wait_threads_exit():
thread.start_new_thread(other_thread, ())
# Wait until we can't acquire it without blocking...
while lock.acquire(blocking=False):
@@ -212,7 +213,7 @@
os.kill(process_pid, signal.SIGUSR1)
done.release()
- with support.wait_threads_exit():
+ with threading_helper.wait_threads_exit():
# Send the signals from the non-main thread, since the main thread
# is the only one that can process signals.
thread.start_new_thread(send_signals, ())