(dsn)
| 1138 | |
| 1139 | |
| 1140 | async def test_override_close(dsn): |
| 1141 | async with pool.AsyncConnectionPool( |
| 1142 | dsn, connection_class=ReturningConnection, min_size=2 |
| 1143 | ) as p: |
| 1144 | await p.wait() |
| 1145 | assert len(p._pool) == 2 |
| 1146 | conn = await p.getconn() |
| 1147 | assert not conn.closed |
| 1148 | assert len(p._pool) == 1 |
| 1149 | await conn.close() |
| 1150 | assert not conn.closed |
| 1151 | assert len(p._pool) == 2 |
| 1152 | |
| 1153 | assert conn.closed |
| 1154 | |
| 1155 | |
| 1156 | async def test_close_returns(dsn): |