bpo-44911: Fixed IsolatedAsyncioTestCase from throwing an exception on leaked tasks (GH-27765)

(cherry picked from commit 2cb1a6806c)

Co-authored-by: Bar Harel <bar.harel@biocatch.com>
This commit is contained in:
Miss Islington (bot) 2021-08-16 02:54:58 -07:00 committed by GitHub
parent 1960409a6d
commit 8516ca500e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 22 additions and 1 deletions

View file

@ -135,7 +135,7 @@ class IsolatedAsyncioTestCase(TestCase):
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():