File tree Expand file tree Collapse file tree 1 file changed +0
-17
lines changed Expand file tree Collapse file tree 1 file changed +0
-17
lines changed Original file line number Diff line number Diff line change @@ -874,23 +874,6 @@ def _scoped_runner(
874
874
)
875
875
876
876
877
- @contextlib .contextmanager
878
- def _provide_event_loop () -> Iterator [asyncio .AbstractEventLoop ]:
879
- policy = _get_event_loop_policy ()
880
- loop = policy .new_event_loop ()
881
- try :
882
- yield loop
883
- finally :
884
- # cleanup the event loop if it hasn't been cleaned up already
885
- if not loop .is_closed ():
886
- try :
887
- loop .run_until_complete (loop .shutdown_asyncgens ())
888
- except Exception as e :
889
- warnings .warn (f"Error cleaning up asyncio loop: { e } " , RuntimeWarning )
890
- finally :
891
- loop .close ()
892
-
893
-
894
877
@pytest .fixture (scope = "session" , autouse = True )
895
878
def event_loop_policy () -> AbstractEventLoopPolicy :
896
879
"""Return an instance of the policy used to create asyncio event loops."""
You can’t perform that action at this time.
0 commit comments