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() 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):