We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e5e3dc7 commit 238ccedCopy full SHA for 238cced
pytest_asyncio/plugin.py
@@ -154,9 +154,11 @@ def inner(**kwargs):
154
155
156
def pytest_runtest_setup(item):
157
- if 'asyncio' in item.keywords and 'event_loop' not in item.fixturenames:
+ if 'asyncio' in item.keywords:
158
# inject an event loop fixture for all async tests
159
- item.fixturenames.append('event_loop')
+ if 'event_loop' in item.fixturenames:
160
+ item.fixturenames.remove('event_loop')
161
+ item.fixturenames.insert(0, 'event_loop')
162
if item.get_closest_marker("asyncio") is not None \
163
and not getattr(item.obj, 'hypothesis', False) \
164
and getattr(item.obj, 'is_hypothesis_test', False):
0 commit comments