(self, retries: int)
| 96 | @pytest.mark.parametrize("retries", range(10)) |
| 97 | @pytest.mark.asyncio |
| 98 | async def test_retry(self, retries: int): |
| 99 | backoff = BackoffMock() |
| 100 | retry = Retry(backoff, retries) |
| 101 | with pytest.raises(ConnectionError): |
| 102 | await retry.call_with_retry(self._do, self._fail) |
| 103 | |
| 104 | assert self.actual_attempts == 1 + retries |
| 105 | assert self.actual_failures == 1 + retries |
| 106 | assert backoff.reset_calls == 1 |
| 107 | assert backoff.calls == retries |
| 108 | |
| 109 | @pytest.mark.asyncio |
| 110 | async def test_infinite_retry(self): |
nothing calls this directly
no test coverage detected