bpo-40275: Adding threading_helper submodule in test.support (GH-20263)
diff --git a/Lib/test/test_queue.py b/Lib/test/test_queue.py
index d88e28a..7b23699 100644
--- a/Lib/test/test_queue.py
+++ b/Lib/test/test_queue.py
@@ -7,6 +7,7 @@
import unittest
import weakref
from test import support
+from test.support import threading_helper
py_queue = support.import_fresh_module('queue', blocked=['_queue'])
c_queue = support.import_fresh_module('queue', fresh=['_queue'])
@@ -63,7 +64,7 @@
block_func)
return self.result
finally:
- support.join_thread(thread) # make sure the thread terminates
+ threading_helper.join_thread(thread) # make sure the thread terminates
# Call this instead if block_func is supposed to raise an exception.
def do_exceptional_blocking_test(self,block_func, block_args, trigger_func,
@@ -79,7 +80,7 @@
self.fail("expected exception of kind %r" %
expected_exception_class)
finally:
- support.join_thread(thread) # make sure the thread terminates
+ threading_helper.join_thread(thread) # make sure the thread terminates
if not thread.startedEvent.is_set():
self.fail("trigger thread ended but event never set")
@@ -484,7 +485,7 @@
args=(q, results, sentinel))
for i in range(n_consumers)]
- with support.start_threads(feeders + consumers):
+ with threading_helper.start_threads(feeders + consumers):
pass
self.assertFalse(exceptions)