MCPcopy
hub / github.com/psycopg/psycopg / test_tpc_commit_with_prepare

Method test_tpc_commit_with_prepare

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

Source from the content-addressed store, hash-verified

79 con.close()
80
81 def test_tpc_commit_with_prepare(self):
82 con = self.connect()
83 try:
84 xid = self.make_xid(con)
85 con.tpc_begin(xid)
86 cursor = con.cursor()
87 cursor.execute("SELECT 1")
88 con.tpc_prepare()
89 con.tpc_commit()
90 finally:
91 con.close()
92
93 def test_tpc_rollback_with_prepare(self):
94 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_commitMethod · 0.45
closeMethod · 0.45

Tested by

no test coverage detected