mirror of
https://github.com/GNS3/gns3-server.git
synced 2024-11-16 16:54:51 +02:00
Restore missing loop
This commit is contained in:
parent
8f296e54f4
commit
46b022f726
@ -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
|
||||||
|
@ -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()
|
||||||
|
@ -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')
|
||||||
|
Loading…
Reference in New Issue
Block a user