From 1548276702700de6cdb806dea6c5ab7d0c5affc1 Mon Sep 17 00:00:00 2001 From: Goffi Date: Fri, 17 Apr 2026 15:27:55 +0200 Subject: [PATCH] test: Python 3.14 compatibility update --- tests/unit/__init__.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tests/unit/__init__.py b/tests/unit/__init__.py index f70ba16e..30854092 100644 --- a/tests/unit/__init__.py +++ b/tests/unit/__init__.py @@ -1,3 +1,11 @@ +import asyncio from pytest_twisted import init_asyncio_reactor +# FIXME: Python 3.14 compatibility fix, see libervia/backend/core/launcher.py for details. +try: + asyncio.get_event_loop() +except RuntimeError: + loop = asyncio.new_event_loop() + asyncio.set_event_loop(loop) + init_asyncio_reactor()