(self, retries)
| 159 | |
| 160 | @pytest.mark.parametrize("retries", range(10)) |
| 161 | def test_retry(self, retries): |
| 162 | backoff = BackoffMock() |
| 163 | retry = Retry(backoff, retries) |
| 164 | with pytest.raises(ConnectionError): |
| 165 | retry.call_with_retry(self._do, self._fail) |
| 166 | |
| 167 | assert self.actual_attempts == 1 + retries |
| 168 | assert self.actual_failures == 1 + retries |
| 169 | assert backoff.reset_calls == 1 |
| 170 | assert backoff.calls == retries |
| 171 | |
| 172 | def test_infinite_retry(self): |
| 173 | backoff = BackoffMock() |
nothing calls this directly
no test coverage detected