MCPcopy
hub / github.com/urllib3/urllib3 / test_retry_both_specified

Method test_retry_both_specified

test/test_retry.py:36–44  ·  test/test_retry.py::TestRetry.test_retry_both_specified

Total can win if it's lower than the connect value

(self)

Source from the content-addressed store, hash-verified

34 )
35
36 def test_retry_both_specified(self) -> None:
37 class="st">""class="st">"Total can win if it&class="cm">#x27;s lower than the connect value"class="st">""
38 error = ConnectTimeoutError()
39 retry = Retry(connect=3, total=2)
40 retry = retry.increment(error=error)
41 retry = retry.increment(error=error)
42 with pytest.raises(MaxRetryError) as e:
43 retry.increment(error=error)
44 assert e.value.reason == error
45
46 def test_retry_higher_total_loses(self) -> None:
47 class="st">""class="st">"A lower connect timeout than the total is honored"class="st">""

Callers

nothing calls this directly

Calls 3

incrementMethod · 0.95
ConnectTimeoutErrorClass · 0.90
RetryClass · 0.90

Tested by

no test coverage detected