File tree Expand file tree Collapse file tree 1 file changed +5
-8
lines changed Expand file tree Collapse file tree 1 file changed +5
-8
lines changed Original file line number Diff line number Diff line change 28
28
29
29
import matplotlib .style
30
30
import pytest
31
+ import pytest_asyncio
31
32
import pytest_check
32
33
from katsdpservices import get_interface_address
33
34
@@ -176,14 +177,10 @@ def key(item: pytest.Item) -> tuple:
176
177
return tuple (ans )
177
178
178
179
items .sort (key = key )
179
-
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 ()
180
+ scope_marker = pytest .mark .asyncio (loop_scope = "session" )
181
+ for item in items :
182
+ if pytest_asyncio .is_async_test (item ):
183
+ item .add_marker (scope_marker , append = False )
187
184
188
185
189
186
@pytest .fixture (scope = "package" )
You can’t perform that action at this time.
0 commit comments