MCPcopy
hub / github.com/urllib3/urllib3 / test_retry_exception_str

Method test_retry_exception_str

test/test_connectionpool.py:300–316  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

298 )
299
300 def test_retry_exception_str(self) -> None:
301 assert (
302 str(MaxRetryError(HTTPConnectionPool(host="localhost"), "Test.", None))
303 == "HTTPConnectionPool(host='localhost', port=None): "
304 "Max retries exceeded with url: Test. (Caused by None)"
305 )
306
307 err = SocketError("Test")
308
309 # using err.__class__ here, as socket.error is an alias for OSError
310 # since Py3.3 and gets printed as this
311 assert (
312 str(MaxRetryError(HTTPConnectionPool(host="localhost"), "Test.", err))
313 == "HTTPConnectionPool(host='localhost', port=None): "
314 "Max retries exceeded with url: Test. "
315 "(Caused by %r)" % err
316 )
317
318 def test_pool_size(self) -> None:
319 POOL_SIZE = 1

Callers

nothing calls this directly

Calls 2

MaxRetryErrorClass · 0.90
HTTPConnectionPoolClass · 0.90

Tested by

no test coverage detected