diff options
Diffstat (limited to 'Lib/test/test_asyncio')
-rw-r--r-- | Lib/test/test_asyncio/test_events.py | 3 | ||||
-rw-r--r-- | Lib/test/test_asyncio/utils.py | 5 |
2 files changed, 5 insertions, 3 deletions
diff --git a/Lib/test/test_asyncio/test_events.py b/Lib/test/test_asyncio/test_events.py index 0fb36188418..e7324d2e481 100644 --- a/Lib/test/test_asyncio/test_events.py +++ b/Lib/test/test_asyncio/test_events.py @@ -33,6 +33,7 @@ from asyncio import selector_events from test.test_asyncio import utils as test_utils from test import support from test.support import socket_helper +from test.support import threading_helper from test.support import ALWAYS_EQ, LARGEST, SMALLEST @@ -706,7 +707,7 @@ class EventLoopTestsMixin: proto.transport.close() lsock.close() - support.join_thread(thread) + threading_helper.join_thread(thread) self.assertFalse(thread.is_alive()) self.assertEqual(proto.state, 'CLOSED') self.assertEqual(proto.nbytes, len(message)) diff --git a/Lib/test/test_asyncio/utils.py b/Lib/test/test_asyncio/utils.py index 804db9166fe..34da7390e1b 100644 --- a/Lib/test/test_asyncio/utils.py +++ b/Lib/test/test_asyncio/utils.py @@ -34,6 +34,7 @@ from asyncio import futures from asyncio import tasks from asyncio.log import logger from test import support +from test.support import threading_helper def data_file(filename): @@ -546,7 +547,7 @@ class TestCase(unittest.TestCase): def setUp(self): self._get_running_loop = events._get_running_loop events._get_running_loop = lambda: None - self._thread_cleanup = support.threading_setup() + self._thread_cleanup = threading_helper.threading_setup() def tearDown(self): self.unpatch_get_running_loop() @@ -558,7 +559,7 @@ class TestCase(unittest.TestCase): self.assertEqual(sys.exc_info(), (None, None, None)) self.doCleanups() - support.threading_cleanup(*self._thread_cleanup) + threading_helper.threading_cleanup(*self._thread_cleanup) support.reap_children() |