MCPcopy Create free account
hub / github.com/tox-dev/filelock / rollback

Function rollback

tests/sqlite/test_transactions_release.py:58–66  ·  view source on GitHub ↗
(connection: ForkSafeConnection)

Source from the content-addressed store, hash-verified

56 failed = False
57
58 def rollback(connection: ForkSafeConnection) -> None:
59 nonlocal failed
60 if failed:
61 sqlite3.Connection.rollback(connection)
62 return
63 failed = True
64 if after_rollback:
65 sqlite3.Connection.rollback(connection)
66 raise error
67
68 mocker.patch.object(ForkSafeConnection, "rollback", new=rollback)
69 return error

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected