From 1d5847780999ab5b1e0a4d055c581d6ba34068e8 Mon Sep 17 00:00:00 2001 From: summer97souls Date: Tue, 16 Jun 2026 13:22:30 +0530 Subject: [PATCH] fix/conftest returning none for asyncio loop factory in pytests fixed --- tests/conftest.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/conftest.py b/tests/conftest.py index 5dbac81..294babd 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -49,7 +49,9 @@ def get_conn_fixture(): def pytest_asyncio_loop_factories(): if sys.platform == "win32": return {"selector": lambda: asyncio.SelectorEventLoop()} - return None + + # Return a valid loop factory for non-Windows platforms + return {"default": lambda: asyncio.new_event_loop()} async def get_async_conn(): return await psycopg.AsyncConnection.connect(DSN)