From 8d48dd3fcb64a222dbeb5b5c385277a58bc54e8b Mon Sep 17 00:00:00 2001 From: Alan Justino Date: Tue, 9 Dec 2025 21:12:08 -0300 Subject: [PATCH 1/2] Every test now runs with Asyncio standard loop too --- tests/conftest.py | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/tests/conftest.py b/tests/conftest.py index a16f5b6..f6a1c17 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -1,8 +1,16 @@ +import asyncio + import pytest import rloop -@pytest.fixture(scope='function') -def loop(): - return rloop.new_event_loop() +EVENT_LOOPS = [ + asyncio.new_event_loop, + rloop.new_event_loop, +] + + +@pytest.fixture(scope='function', params=EVENT_LOOPS, ids=lambda x: type(x())) +def loop(request): + return request.param() From ee258586f23f935f87a90d2455acaeb525c3fc2e Mon Sep 17 00:00:00 2001 From: Alan Justino Date: Fri, 12 Dec 2025 11:55:13 -0300 Subject: [PATCH 2/2] Skip test_call_later_negative for Asyncio: It behaves differently --- tests/test_handles.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tests/test_handles.py b/tests/test_handles.py index c0c68e9..b541b16 100644 --- a/tests/test_handles.py +++ b/tests/test_handles.py @@ -1,5 +1,7 @@ import threading +import pytest + def run_loop(loop): async def run(): @@ -37,6 +39,9 @@ def stop(): def test_call_later_negative(loop): + if type(loop).__module__.startswith('asyncio'): + pytest.skip('Asyncio std loop schedule negatives differently.') + calls = [] def cb(arg):