Skip to content

Commit 6b85e2b

Browse files
committed
Remove sleep in tests
1 parent b31f5f0 commit 6b85e2b

1 file changed

Lines changed: 0 additions & 6 deletions

File tree

tests/test_graph.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import asyncio
21
import re
32
import uuid
43
from 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:

0 commit comments

Comments
 (0)