File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- import asyncio
21import re
32import uuid
43from contextlib import asynccontextmanager , contextmanager
@@ -31,7 +30,6 @@ async def test_dependency_async_successful() -> None:
3130 """Test that async dependencies work fine."""
3231
3332 async def dep1 () -> int :
34- await asyncio .sleep (0.001 )
3533 return 1
3634
3735 def testfunc (a : int = Depends (dep1 )) -> int :
@@ -90,12 +88,10 @@ async def dep1() -> AsyncGenerator[int, None]:
9088 nonlocal starts # noqa: WPS420
9189 nonlocal closes # noqa: WPS420
9290
93- await asyncio .sleep (0.001 )
9491 starts += 1
9592
9693 yield 1
9794
98- await asyncio .sleep (0.001 )
9995 closes += 1
10096
10197 def testfunc (a : int = Depends (dep1 )) -> int :
@@ -159,13 +155,11 @@ async def dep1() -> AsyncGenerator[int, None]:
159155 nonlocal starts # noqa: WPS420
160156 nonlocal closes # noqa: WPS420
161157
162- await asyncio .sleep (0.001 )
163158 starts += 1
164159
165160 try :
166161 yield 1
167162 finally :
168- await asyncio .sleep (0.001 )
169163 closes += 1
170164
171165 def testfunc (a : int = Depends (dep1 )) -> int :
You can’t perform that action at this time.
0 commit comments