test_tornado: Add nocoverage for task cleanup.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
Anders Kaseorg
2025-02-14 16:36:30 -08:00
committed by Anders Kaseorg
parent 12f95a81a9
commit b50ac9d8df

View File

@@ -49,7 +49,7 @@ class TornadoWebTestCase(ZulipTestCase):
self.http_server.stop()
await self.http_server.close_all_connections()
tasks = set(asyncio.all_tasks()) - {asyncio.current_task()}
if tasks:
if tasks: # nocoverage
await asyncio.wait(tasks)
async def fetch_async(self, method: str, path: str, **kwargs: Any) -> HTTPResponse: