File tree Expand file tree Collapse file tree 1 file changed +2
-6
lines changed Expand file tree Collapse file tree 1 file changed +2
-6
lines changed Original file line number Diff line number Diff line change @@ -811,12 +811,8 @@ def pytest_runtest_setup(item: pytest.Item) -> None:
811
811
if marker is None :
812
812
return
813
813
default_loop_scope = _get_default_test_loop_scope (item .config )
814
- scope = _get_marked_loop_scope (marker , default_loop_scope )
815
- if scope != "function" :
816
- parent_node = _retrieve_scope_root (item , scope )
817
- event_loop_fixture_id = parent_node .stash [_event_loop_fixture_id ]
818
- else :
819
- event_loop_fixture_id = "_function_event_loop"
814
+ loop_scope = _get_marked_loop_scope (marker , default_loop_scope )
815
+ event_loop_fixture_id = f"_{ loop_scope } _event_loop"
820
816
fixturenames = item .fixturenames # type: ignore[attr-defined]
821
817
if event_loop_fixture_id not in fixturenames :
822
818
fixturenames .append (event_loop_fixture_id )
You can’t perform that action at this time.
0 commit comments