File tree Expand file tree Collapse file tree 1 file changed +0
-27
lines changed Expand file tree Collapse file tree 1 file changed +0
-27
lines changed Original file line number Diff line number Diff line change 19
19
Generator ,
20
20
Iterable ,
21
21
Iterator ,
22
- Mapping ,
23
22
Sequence ,
24
23
)
25
24
from typing import (
52
51
PytestDeprecationWarning ,
53
52
PytestPluginManager ,
54
53
Session ,
55
- StashKey ,
56
54
)
57
55
58
56
if sys .version_info >= (3 , 10 ):
@@ -641,31 +639,6 @@ def pytest_pycollect_makeitem_convert_async_functions_to_subclass(
641
639
hook_result .force_result (updated_node_collection )
642
640
643
641
644
- _event_loop_fixture_id = StashKey [str ]()
645
- _fixture_scope_by_collector_type : Mapping [type [pytest .Collector ], _ScopeName ] = {
646
- Class : "class" ,
647
- # Package is a subclass of module and the dict is used in isinstance checks
648
- # Therefore, the order matters and Package needs to appear before Module
649
- Package : "package" ,
650
- Module : "module" ,
651
- Session : "session" ,
652
- }
653
-
654
-
655
- @pytest .hookimpl
656
- def pytest_collectstart (collector : pytest .Collector ) -> None :
657
- try :
658
- collector_scope = next (
659
- scope
660
- for cls , scope in _fixture_scope_by_collector_type .items ()
661
- if isinstance (collector , cls )
662
- )
663
- except StopIteration :
664
- return
665
- event_loop_fixture_id = f"_{ collector_scope } _event_loop"
666
- collector .stash [_event_loop_fixture_id ] = event_loop_fixture_id
667
-
668
-
669
642
@contextlib .contextmanager
670
643
def _temporary_event_loop_policy (policy : AbstractEventLoopPolicy ) -> Iterator [None ]:
671
644
old_loop_policy = asyncio .get_event_loop_policy ()
You can’t perform that action at this time.
0 commit comments