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

Method test_retry_both_specified

test/test_retry.py:36–44  ·  view source on GitHub ↗

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 """Total can win if it's lower than the connect value"""
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 """A lower connect timeout than the total is honored"""

Callers

nothing calls this directly

Calls 3

incrementMethod · 0.95
ConnectTimeoutErrorClass · 0.90
RetryClass · 0.90

Tested by

no test coverage detected