summaryrefslogtreecommitdiff
path: root/Lib/test/lock_tests.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/test/lock_tests.py')
-rw-r--r--Lib/test/lock_tests.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/Lib/test/lock_tests.py b/Lib/test/lock_tests.py
index b3975254c7..d69bcc9496 100644
--- a/Lib/test/lock_tests.py
+++ b/Lib/test/lock_tests.py
@@ -11,6 +11,7 @@ import unittest
import weakref
from test import support
+from test.support import threading_helper
requires_fork = unittest.skipUnless(hasattr(os, 'fork'),
@@ -37,7 +38,7 @@ class Bunch(object):
self.started = []
self.finished = []
self._can_exit = not wait_before_exit
- self.wait_thread = support.wait_threads_exit()
+ self.wait_thread = threading_helper.wait_threads_exit()
self.wait_thread.__enter__()
def task():
@@ -73,10 +74,10 @@ class Bunch(object):
class BaseTestCase(unittest.TestCase):
def setUp(self):
- self._threads = support.threading_setup()
+ self._threads = threading_helper.threading_setup()
def tearDown(self):
- support.threading_cleanup(*self._threads)
+ threading_helper.threading_cleanup(*self._threads)
support.reap_children()
def assertTimeout(self, actual, expected):
@@ -239,7 +240,7 @@ class LockTests(BaseLockTests):
lock.acquire()
phase.append(None)
- with support.wait_threads_exit():
+ with threading_helper.wait_threads_exit():
start_new_thread(f, ())
while len(phase) == 0:
_wait()