Skip to content

Commit

Permalink
fixed tests
Browse files Browse the repository at this point in the history
  • Loading branch information
daniel-sanche committed Nov 9, 2023
1 parent c101ea6 commit 3642d74
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions tests/asyncio/test_retry_async.py
Original file line number Diff line number Diff line change
Expand Up @@ -548,7 +548,6 @@ async def test___call___generator_cancellations(self):
generator = await retry_(self._generator_mock)(sleep_time=0.2)
await generator.__anext__() == 0
task = asyncio.create_task(generator.__anext__())
await asyncio.sleep(0.1)
task.cancel()
with pytest.raises(asyncio.CancelledError):
await task
Expand Down Expand Up @@ -685,7 +684,7 @@ async def test___call___with_generator_throw(self, sleep):
@pytest.mark.parametrize("awaitable_wrapped", [True, False])
@mock.patch("asyncio.sleep", autospec=True)
@pytest.mark.asyncio
async def test___call___with_iterable_send(self, sleep, awaitale_wrapped):
async def test___call___with_iterable_send(self, sleep, awaitable_wrapped):
"""
Send should work like next if the wrapped iterable does not support it
"""
Expand Down Expand Up @@ -724,7 +723,7 @@ async def wrapper():
@pytest.mark.parametrize("awaitable_wrapped", [True, False])
@mock.patch("asyncio.sleep", autospec=True)
@pytest.mark.asyncio
async def test___call___with_iterable_close(self, sleep, awaitale_wrapped):
async def test___call___with_iterable_close(self, sleep, awaitable_wrapped):
"""
close should be handled by wrapper if wrapped iterable does not support it
"""
Expand All @@ -744,7 +743,7 @@ async def __anext__(self):

return CustomIterable()

if awaitale_wrapped:
if awaitable_wrapped:

async def wrapper():
return iterable_fn()
Expand All @@ -768,7 +767,7 @@ async def wrapper():
@pytest.mark.parametrize("awaitable_wrapped", [True, False])
@mock.patch("asyncio.sleep", autospec=True)
@pytest.mark.asyncio
async def test___call___with_iterable_throw(self, sleep, awaitale_wrapped):
async def test___call___with_iterable_throw(self, sleep, awaitable_wrapped):
"""
Throw should work even if the wrapped iterable does not support it
"""
Expand All @@ -790,7 +789,7 @@ async def __anext__(self):

return CustomIterable()

if awaitale_wrapped:
if awaitable_wrapped:

async def wrapper():
return iterable_fn()
Expand Down

0 comments on commit 3642d74

Please sign in to comment.