From c7926bda7315d22252bbbca2ca393bf37c078cc8 Mon Sep 17 00:00:00 2001 From: Moshe Jacobs Date: Fri, 17 Feb 2023 12:38:25 +0200 Subject: [PATCH] Changed asyncio to `run()` as per @graingert's suggestion https://github.com/spulec/freezegun/pull/421#discussion_r847136185 --- tests/test_asyncio.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test_asyncio.py b/tests/test_asyncio.py index a6f690db..6f6a1a3a 100644 --- a/tests/test_asyncio.py +++ b/tests/test_asyncio.py @@ -14,4 +14,4 @@ def test_time_freeze_coroutine(): async def frozen_coroutine(): assert datetime.date.today() == datetime.date(1970, 1, 1) - asyncio.new_event_loop().run_until_complete(frozen_coroutine()) + asyncio.run(frozen_coroutine())