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
547
547
548
548
549
549
@contextlib .contextmanager
550
- def _temporary_event_loop (loop :AbstractEventLoop ):
550
+ def _temporary_event_loop (loop : AbstractEventLoop ):
551
551
try :
552
552
old_event_loop = asyncio .get_event_loop ()
553
553
except RuntimeError :
554
554
old_event_loop = None
555
-
555
+
556
556
asyncio .set_event_loop (old_event_loop )
557
557
try :
558
- yield
558
+ yield
559
559
finally :
560
560
asyncio .set_event_loop (old_event_loop )
561
561
562
562
563
-
564
563
def _get_event_loop_policy () -> AbstractEventLoopPolicy :
565
564
with warnings .catch_warnings ():
566
565
warnings .simplefilter ("ignore" , DeprecationWarning )
@@ -787,9 +786,6 @@ def _scoped_runner(
787
786
RuntimeWarning ,
788
787
)
789
788
790
-
791
-
792
-
793
789
return _scoped_runner
794
790
795
791
@@ -798,6 +794,7 @@ def _scoped_runner(
798
794
scope .value
799
795
)
800
796
797
+
801
798
@pytest .fixture (scope = "session" , autouse = True )
802
799
def new_event_loop () -> AbstractEventLoop :
803
800
"""Creates a new eventloop for different tests being ran"""
You can’t perform that action at this time.
0 commit comments