(self)
| 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 |
nothing calls this directly
no test coverage detected