mirror of
https://github.com/python/cpython.git
synced 2025-12-08 06:10:17 +00:00
[3.9] GH-89074: Fixed IsolatedAsyncioTestCase from throwing an exception on leaked tasks (GH-27765) (#91471)
(cherry picked from commit 2cb1a6806c)
Co-authored-by: Bar Harel <bar.harel@biocatch.com>
This commit is contained in:
parent
8cd0f27492
commit
4cc4fe2789
3 changed files with 22 additions and 1 deletions
|
|
@ -134,7 +134,7 @@ def _tearDownAsyncioLoop(self):
|
|||
task.cancel()
|
||||
|
||||
loop.run_until_complete(
|
||||
asyncio.gather(*to_cancel, loop=loop, return_exceptions=True))
|
||||
asyncio.gather(*to_cancel, return_exceptions=True))
|
||||
|
||||
for task in to_cancel:
|
||||
if task.cancelled():
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue