bpo-44911: Fixed IsolatedAsyncioTestCase from throwing an exception on leaked tasks (GH-27765)
(cherry picked from commit 2cb1a6806c0cefab0c3a40fdd428a89a4392570e)
Co-authored-by: Bar Harel <bar.harel@biocatch.com>
diff --git a/Lib/unittest/async_case.py b/Lib/unittest/async_case.py
index 520213c..86ed704 100644
--- a/Lib/unittest/async_case.py
+++ b/Lib/unittest/async_case.py
@@ -135,7 +135,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():