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 2828
2929import matplotlib .style
3030import pytest
31+ import pytest_asyncio
3132import pytest_check
3233from katsdpservices import get_interface_address
3334
@@ -176,14 +177,10 @@ def key(item: pytest.Item) -> tuple:
176177 return tuple (ans )
177178
178179 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 )
187184
188185
189186@pytest .fixture (scope = "package" )
You can’t perform that action at this time.
0 commit comments