diff --git a/requirements_test.txt b/requirements_test.txt index 452b1f70..44bc2532 100644 --- a/requirements_test.txt +++ b/requirements_test.txt @@ -1,5 +1,5 @@ pytest==8.4.2 -pytest-asyncio==0.26.0 +pytest-asyncio==1.3.0 pytest-cov==7.0.0 pytest-mock==3.14.1 pytest-timeout==2.4.0 diff --git a/tests/conftest.py b/tests/conftest.py index 8942b946..f4345590 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -1,5 +1,7 @@ """Provide package level pytest fixtures.""" +import asyncio + import pytest from camacq.control import Center @@ -7,9 +9,9 @@ @pytest.fixture(name="center") -def center_fixture(event_loop): +async def center_fixture(): """Give access to center via fixture.""" - _center = Center(loop=event_loop) + _center = Center(loop=asyncio.get_running_loop()) _center._track_tasks = True # pylint: disable=protected-access yield _center