(self)
| 397 | old_pool_queue.get(block=False) |
| 398 | |
| 399 | def test_pool_close_twice(self) -> None: |
| 400 | pool = connection_from_url("http://google.com:80") |
| 401 | |
| 402 | # Populate with some connections |
| 403 | conn1 = pool._get_conn() |
| 404 | conn2 = pool._get_conn() |
| 405 | pool._put_conn(conn1) |
| 406 | pool._put_conn(conn2) |
| 407 | |
| 408 | pool.close() |
| 409 | assert pool.pool is None |
| 410 | |
| 411 | try: |
| 412 | pool.close() |
| 413 | except AttributeError: |
| 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: |
nothing calls this directly
no test coverage detected