1
0
mirror of https://github.com/GNS3/gns3-server synced 2025-01-12 09:00:57 +00:00

Do not try to use ProactorEventLoop() on non Windows platforms.

This commit is contained in:
grossmj 2020-06-16 18:45:11 +09:30
parent 8976384a56
commit 09e9382df1

View File

@ -22,9 +22,10 @@ from .handlers.api.base import Query
sys._called_from_test = True sys._called_from_test = True
sys.original_platform = sys.platform 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") if sys.platform.startswith("win"):
def loop(request): @pytest.yield_fixture(scope="session")
def loop(request):
"""Return an event loop and destroy it at the end of test""" """Return an event loop and destroy it at the end of test"""
loop = asyncio.ProactorEventLoop() loop = asyncio.ProactorEventLoop()