From cefcb7a433985a64ab7311a39b44eb5a587c575e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Voron?= Date: Fri, 14 Apr 2023 15:49:58 +0200 Subject: [PATCH] Fix pytest-asyncio warning regarding event loop fixture --- tests/conftest.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/conftest.py b/tests/conftest.py index e0fcabb5..6fb14340 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -128,9 +128,9 @@ class UserManagerMock(BaseTestUserManager[models.UP]): @pytest.fixture(scope="session") def event_loop(): - """Force the pytest-asyncio loop to be the main one.""" loop = asyncio.get_event_loop() yield loop + loop.close() AsyncMethodMocker = Callable[..., MagicMock]