| 383 | |
| 384 | class PoolDialectTest(PoolTestBase): |
| 385 | def _dialect(self): |
| 386 | canary = [] |
| 387 | |
| 388 | class PoolDialect: |
| 389 | is_async = False |
| 390 | |
| 391 | def do_rollback(self, dbapi_connection): |
| 392 | canary.append("R") |
| 393 | dbapi_connection.rollback() |
| 394 | |
| 395 | def do_commit(self, dbapi_connection): |
| 396 | canary.append("C") |
| 397 | dbapi_connection.commit() |
| 398 | |
| 399 | def do_close(self, dbapi_connection): |
| 400 | canary.append("CL") |
| 401 | dbapi_connection.close() |
| 402 | |
| 403 | def get_driver_connection(self, connection): |
| 404 | return connection |
| 405 | |
| 406 | return PoolDialect(), canary |
| 407 | |
| 408 | def _do_test(self, pool_cls, assertion): |
| 409 | mock_dbapi = MockDBAPI() |