MCPcopy
hub / github.com/psycopg/psycopg / test_tpc_rollback_with_prepare

Method test_tpc_rollback_with_prepare

tests/dbapi20_tpc.py:93–103  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

91 con.close()
92
93 def test_tpc_rollback_with_prepare(self):
94 con = self.connect()
95 try:
96 xid = self.make_xid(con)
97 con.tpc_begin(xid)
98 cursor = con.cursor()
99 cursor.execute("SELECT 1")
100 con.tpc_prepare()
101 con.tpc_rollback()
102 finally:
103 con.close()
104
105 def test_tpc_begin_in_transaction_fails(self):
106 con = self.connect()

Callers

nothing calls this directly

Calls 8

connectMethod · 0.95
make_xidMethod · 0.95
tpc_beginMethod · 0.45
cursorMethod · 0.45
executeMethod · 0.45
tpc_prepareMethod · 0.45
tpc_rollbackMethod · 0.45
closeMethod · 0.45

Tested by

no test coverage detected