| 1321 | assert_raises(exc.DBAPIError, engine.connect) |
| 1322 | |
| 1323 | def test_null_pool(self): |
| 1324 | engine = engines.reconnecting_engine( |
| 1325 | options=dict(poolclass=pool.NullPool) |
| 1326 | ) |
| 1327 | with engine.connect() as conn: |
| 1328 | eq_(conn.execute(select(1)).scalar(), 1) |
| 1329 | assert not conn.closed |
| 1330 | engine.test_shutdown() |
| 1331 | _assert_invalidated(conn.execute, select(1)) |
| 1332 | assert not conn.closed |
| 1333 | assert conn.invalidated |
| 1334 | conn.rollback() |
| 1335 | eq_(conn.execute(select(1)).scalar(), 1) |
| 1336 | assert not conn.invalidated |
| 1337 | |
| 1338 | def test_close(self): |
| 1339 | with self.engine.connect() as conn: |