mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
bpo-40275: Adding threading_helper submodule in test.support (GH-20263)
This commit is contained in:
parent
7d80b35af1
commit
e80697d687
46 changed files with 483 additions and 428 deletions
|
@ -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()
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue