MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / rollback

Function rollback

test/engine/test_reconnect.py:101–110  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

99 yield mock_cursor()
100
101 def rollback():
102 if conn.explode == "rollback":
103 raise MockDisconnect("Lost the DB connection on rollback")
104 if conn.explode == "rollback_no_disconnect":
105 raise MockError(
106 "something broke on rollback but we didn't lose the "
107 "connection"
108 )
109 else:
110 return
111
112 def commit():
113 if conn.explode == "commit":

Callers

nothing calls this directly

Calls 2

MockDisconnectClass · 0.85
MockErrorClass · 0.85

Tested by

no test coverage detected