We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a801b91 commit b1d647aCopy full SHA for b1d647a
qualification/conftest.py
@@ -28,6 +28,7 @@
28
29
import matplotlib.style
30
import pytest
31
+import pytest_asyncio
32
import pytest_check
33
from katsdpservices import get_interface_address
34
@@ -176,14 +177,10 @@ def key(item: pytest.Item) -> tuple:
176
177
return tuple(ans)
178
179
items.sort(key=key)
-
180
181
-# Need to redefine this from pytest-asyncio to have it at session scope
182
-@pytest.fixture(scope="session")
183
-def event_loop(): # noqa: D103
184
- loop = asyncio.get_event_loop_policy().new_event_loop()
185
- yield loop
186
- loop.close()
+ scope_marker = pytest.mark.asyncio(loop_scope="session")
+ for item in items:
+ if pytest_asyncio.is_async_test(item):
+ item.add_marker(scope_marker, append=False)
187
188
189
@pytest.fixture(scope="package")
0 commit comments