File tree 1 file changed +1
-12
lines changed
1 file changed +1
-12
lines changed Original file line number Diff line number Diff line change 11
11
import socket
12
12
import sys
13
13
import warnings
14
- from asyncio import AbstractEventLoop , AbstractEventLoopPolicy
14
+ from asyncio import AbstractEventLoopPolicy
15
15
from collections .abc import (
16
16
AsyncIterator ,
17
17
Awaitable ,
@@ -798,11 +798,6 @@ def pytest_generate_tests(metafunc: Metafunc) -> None:
798
798
)
799
799
800
800
801
- def _make_pytest_asyncio_loop (loop : AbstractEventLoop ) -> AbstractEventLoop :
802
- loop .__pytest_asyncio = True # type: ignore[attr-defined]
803
- return loop
804
-
805
-
806
801
def _get_event_loop_no_warn (
807
802
policy : AbstractEventLoopPolicy | None = None ,
808
803
) -> asyncio .AbstractEventLoop :
@@ -996,12 +991,6 @@ def _function_event_loop(
996
991
@contextlib .contextmanager
997
992
def _provide_event_loop () -> Iterator [asyncio .AbstractEventLoop ]:
998
993
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 )
1005
994
try :
1006
995
yield loop
1007
996
finally :
You can’t perform that action at this time.
0 commit comments