File tree Expand file tree Collapse file tree 1 file changed +1
-12
lines changed Expand file tree Collapse file tree 1 file changed +1
-12
lines changed Original file line number Diff line number Diff line change 1111import socket
1212import sys
1313import warnings
14- from asyncio import AbstractEventLoop , AbstractEventLoopPolicy
14+ from asyncio import AbstractEventLoopPolicy
1515from collections .abc import (
1616 AsyncIterator ,
1717 Awaitable ,
@@ -798,11 +798,6 @@ def pytest_generate_tests(metafunc: Metafunc) -> None:
798798 )
799799
800800
801- def _make_pytest_asyncio_loop (loop : AbstractEventLoop ) -> AbstractEventLoop :
802- loop .__pytest_asyncio = True # type: ignore[attr-defined]
803- return loop
804-
805-
806801def _get_event_loop_no_warn (
807802 policy : AbstractEventLoopPolicy | None = None ,
808803) -> asyncio .AbstractEventLoop :
@@ -996,12 +991,6 @@ def _function_event_loop(
996991@contextlib .contextmanager
997992def _provide_event_loop () -> Iterator [asyncio .AbstractEventLoop ]:
998993 loop = asyncio .get_event_loop_policy ().new_event_loop ()
999- # Add a magic value to the event loop, so pytest-asyncio can determine if the
1000- # event_loop fixture was overridden. Other implementations of event_loop don't
1001- # set this value.
1002- # The magic value must be set as part of the function definition, because pytest
1003- # seems to have multiple instances of the same FixtureDef or fixture function
1004- loop = _make_pytest_asyncio_loop (loop )
1005994 try :
1006995 yield loop
1007996 finally :
You can’t perform that action at this time.
0 commit comments