mirror of
https://github.com/python/cpython.git
synced 2025-08-03 16:39:00 +00:00
bpo-31250, test_asyncio: fix EventLoopTestsMixin.tearDown() (#3264)
Call doCleanups() to close the loop after calling executor.shutdown(wait=True): see TestCase.set_event_loop() of asyncio.test_utils. Replace also gc.collect() with support.gc_collect().
This commit is contained in:
parent
b713adf27a
commit
e8a533fbc7
1 changed files with 2 additions and 2 deletions
|
@ -258,8 +258,8 @@ class EventLoopTestsMixin:
|
|||
if not self.loop.is_closed():
|
||||
test_utils.run_briefly(self.loop)
|
||||
|
||||
self.loop.close()
|
||||
gc.collect()
|
||||
self.doCleanups()
|
||||
support.gc_collect()
|
||||
super().tearDown()
|
||||
|
||||
def test_run_until_complete_nesting(self):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue