Restore missing loop

This commit is contained in:
grossmj 2022-08-27 23:45:30 +02:00
parent 8f296e54f4
commit 46b022f726
3 changed files with 4 additions and 4 deletions

View File

@ -21,7 +21,7 @@ from gns3server.compute.vmware import VMware
@pytest.fixture @pytest.fixture
async def manager(port_manager): async def manager(loop, port_manager):
m = VMware.instance() m = VMware.instance()
m.port_manager = port_manager m.port_manager = port_manager

View File

@ -30,7 +30,7 @@ async def manager(loop, port_manager):
@pytest.fixture(scope="function") @pytest.fixture(scope="function")
async def vm(loop, compute_project, manager, tmpdir): async def vm(compute_project, manager, tmpdir):
fake_vmx = str(tmpdir / "test.vmx") fake_vmx = str(tmpdir / "test.vmx")
open(fake_vmx, "w+").close() open(fake_vmx, "w+").close()

View File

@ -29,9 +29,9 @@ if sys.platform.startswith("win"):
"""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()
asyncio.set_loop(loop) # Replace main loop to avoid conflict between tests asyncio.set_event_loop(loop) # Replace main loop to avoid conflict between tests
yield loop yield loop
asyncio.set_loop(None) asyncio.set_event_loop(None)
@pytest.fixture(scope='function') @pytest.fixture(scope='function')