(self)
| 414 | pytest.fail("Pool of the ConnectionPool is None and has no attribute get.") |
| 415 | |
| 416 | def test_pool_timeouts(self) -> None: |
| 417 | with HTTPConnectionPool(host="localhost") as pool: |
| 418 | conn = pool._new_conn() |
| 419 | assert conn.__class__ == HTTPConnection |
| 420 | assert pool.timeout.__class__ == Timeout |
| 421 | assert pool.timeout._read == _DEFAULT_TIMEOUT |
| 422 | assert pool.timeout._connect == _DEFAULT_TIMEOUT |
| 423 | assert pool.timeout.total is None |
| 424 | |
| 425 | pool = HTTPConnectionPool(host="localhost", timeout=SHORT_TIMEOUT) |
| 426 | assert pool.timeout._read == SHORT_TIMEOUT |
| 427 | assert pool.timeout._connect == SHORT_TIMEOUT |
| 428 | assert pool.timeout.total is None |
| 429 | |
| 430 | def test_no_host(self) -> None: |
| 431 | with pytest.raises(LocationValueError): |
nothing calls this directly
no test coverage detected