diff --git a/tests/conftest.py b/tests/conftest.py index 2d81ce20..d94b4bc2 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -22,15 +22,16 @@ from .handlers.api.base import Query sys._called_from_test = True sys.original_platform = sys.platform -@pytest.mark.skipif(not sys.platform.startswith("win"), reason="asyncio.ProactorEventLoop() is Only supported on Windows") -@pytest.yield_fixture(scope="session") -def loop(request): - """Return an event loop and destroy it at the end of test""" - loop = asyncio.ProactorEventLoop() - asyncio.set_event_loop(loop) # Replace main loop to avoid conflict between tests - yield loop - asyncio.set_event_loop(None) +if sys.platform.startswith("win"): + @pytest.yield_fixture(scope="session") + def loop(request): + """Return an event loop and destroy it at the end of test""" + + loop = asyncio.ProactorEventLoop() + asyncio.set_event_loop(loop) # Replace main loop to avoid conflict between tests + yield loop + asyncio.set_event_loop(None) @pytest.fixture(scope='function')