File tree Expand file tree Collapse file tree 1 file changed +4
-7
lines changed Expand file tree Collapse file tree 1 file changed +4
-7
lines changed Original file line number Diff line number Diff line change @@ -632,20 +632,19 @@ def _temporary_event_loop_policy(policy: AbstractEventLoopPolicy) -> Iterator[No
632632
633633
634634@contextlib .contextmanager
635- def _temporary_event_loop (loop :AbstractEventLoop ):
635+ def _temporary_event_loop (loop : AbstractEventLoop ):
636636 try :
637637 old_event_loop = asyncio .get_event_loop ()
638638 except RuntimeError :
639639 old_event_loop = None
640-
640+
641641 asyncio .set_event_loop (old_event_loop )
642642 try :
643- yield
643+ yield
644644 finally :
645645 asyncio .set_event_loop (old_event_loop )
646646
647647
648-
649648def _get_event_loop_policy () -> AbstractEventLoopPolicy :
650649 with warnings .catch_warnings ():
651650 warnings .simplefilter ("ignore" , DeprecationWarning )
@@ -841,9 +840,6 @@ def _scoped_runner(
841840 RuntimeWarning ,
842841 )
843842
844-
845-
846-
847843 return _scoped_runner
848844
849845
@@ -852,6 +848,7 @@ def _scoped_runner(
852848 scope .value
853849 )
854850
851+
855852@pytest .fixture (scope = "session" , autouse = True )
856853def new_event_loop () -> AbstractEventLoop :
857854 """Creates a new eventloop for different tests being ran"""
You can’t perform that action at this time.
0 commit comments