diff --git a/tests/handlers/views.py b/tests/handlers/views.py index 455532dd3c..6d573c5df8 100644 --- a/tests/handlers/views.py +++ b/tests/handlers/views.py @@ -58,5 +58,8 @@ class CoroutineClearingView: self._unawaited_coroutine = asyncio.sleep(0) return self._unawaited_coroutine + def __del__(self): + self._unawaited_coroutine.close() + async_unawaited = CoroutineClearingView()