MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / go

Method go

test/engine/test_transaction.py:201–210  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

199 transaction = [None]
200
201 def go():
202 with mock.patch.object(
203 connection,
204 "_commit_impl",
205 mock.Mock(
206 side_effect=exc.DBAPIError("failure", None, None, None)
207 ),
208 ):
209 with connection.begin() as t1:
210 transaction[0] = t1
211
212 assert_raises_message(exc.DBAPIError, r"failure", go)
213

Callers

nothing calls this directly

Calls 4

objectMethod · 0.80
beginMethod · 0.45
begin_nestedMethod · 0.45
do_release_savepointMethod · 0.45

Tested by

no test coverage detected