(real_connection: sqlite3.Connection)
| 279 | return cursor |
| 280 | |
| 281 | def rollback(real_connection: sqlite3.Connection) -> None: |
| 282 | nonlocal rollback_failed |
| 283 | if not rollback_failed: |
| 284 | rollback_failed = True |
| 285 | try: |
| 286 | raise prior_rollback_error |
| 287 | except LookupError: |
| 288 | raise rollback_error # ruff:ignore[raise-without-from-inside-except] # exercise implicit backend context preservation |
| 289 | real_connection.rollback() |
| 290 | |
| 291 | patch_connection(mocker, execute=execute, rollback=rollback) |
| 292 | return _RollbackFailures(acquire_error, rollback_error, prior_rollback_error) |
nothing calls this directly
no outgoing calls
no test coverage detected