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 @@ -547,20 +547,19 @@ def _temporary_event_loop_policy(policy: AbstractEventLoopPolicy) -> Iterator[No
547547
548548
549549@contextlib .contextmanager
550- def _temporary_event_loop (loop :AbstractEventLoop ):
550+ def _temporary_event_loop (loop : AbstractEventLoop ):
551551 try :
552552 old_event_loop = asyncio .get_event_loop ()
553553 except RuntimeError :
554554 old_event_loop = None
555-
555+
556556 asyncio .set_event_loop (old_event_loop )
557557 try :
558- yield
558+ yield
559559 finally :
560560 asyncio .set_event_loop (old_event_loop )
561561
562562
563-
564563def _get_event_loop_policy () -> AbstractEventLoopPolicy :
565564 with warnings .catch_warnings ():
566565 warnings .simplefilter ("ignore" , DeprecationWarning )
@@ -787,9 +786,6 @@ def _scoped_runner(
787786 RuntimeWarning ,
788787 )
789788
790-
791-
792-
793789 return _scoped_runner
794790
795791
@@ -798,6 +794,7 @@ def _scoped_runner(
798794 scope .value
799795 )
800796
797+
801798@pytest .fixture (scope = "session" , autouse = True )
802799def new_event_loop () -> AbstractEventLoop :
803800 """Creates a new eventloop for different tests being ran"""
You can’t perform that action at this time.
0 commit comments