Skip to content

Commit 93ad585

Browse files
Apply suggestions from code review
1 parent b071971 commit 93ad585

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

tests/test_close.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ async def test_cache_close_wait_bound_method(check_lru: Callable[..., None]) ->
4848
class Foo:
4949
@alru_cache()
5050
async def coro(self, val: int) -> int:
51-
await asyncio.sleep(0.05)
51+
await asyncio.sleep(0.02)
5252
return val
5353

5454
foo = Foo()
@@ -57,7 +57,8 @@ async def coro(self, val: int) -> int:
5757
coros = [foo.coro(v) for v in inputs]
5858
gather = asyncio.gather(*coros)
5959

60-
await asyncio.sleep(0.01)
60+
# Yield to loop to start tasks
61+
await asyncio.sleep(0)
6162

6263
# wait=True should allow tasks to finish (no cancellation)
6364
await foo.coro.cache_close(wait=True)

0 commit comments

Comments
 (0)