If an unexpected error is raised, should retry other times
(self)
| 101 | assert not Retry(False).raise_on_redirect |
| 102 | |
| 103 | def test_retry_other(self) -> None: |
| 104 | """If an unexpected error is raised, should retry other times""" |
| 105 | other_error = SSLError() |
| 106 | retry = Retry(connect=1) |
| 107 | retry = retry.increment(error=other_error) |
| 108 | retry = retry.increment(error=other_error) |
| 109 | assert not retry.is_exhausted() |
| 110 | |
| 111 | retry = Retry(other=1) |
| 112 | retry = retry.increment(error=other_error) |
| 113 | with pytest.raises(MaxRetryError) as e: |
| 114 | retry.increment(error=other_error) |
| 115 | assert e.value.reason == other_error |
| 116 | |
| 117 | def test_retry_read_zero(self) -> None: |
| 118 | """No second chances on read timeouts, by default""" |
nothing calls this directly
no test coverage detected