Skip to content

Commit

Permalink
tweak timeout
Browse files Browse the repository at this point in the history
  • Loading branch information
jhamman committed Oct 23, 2024
1 parent 0e542f7 commit df24e61
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/test_sync.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,13 +61,13 @@ def test_sync_raises(sync_loop: asyncio.AbstractEventLoop | None) -> None:


def test_sync_timeout() -> None:
duration = 0.004
duration = 0.02

async def foo() -> None:
await asyncio.sleep(duration)

with pytest.raises(asyncio.TimeoutError):
sync(foo(), timeout=duration / 2)
sync(foo(), timeout=duration / 10)


def test_sync_raises_if_no_coroutine(sync_loop: asyncio.AbstractEventLoop | None) -> None:
Expand Down

0 comments on commit df24e61

Please sign in to comment.