MCPcopy
hub / github.com/psycopg/psycopg / test_tpc_disabled

Function test_tpc_disabled

tests/test_tpc_async.py:9–18  ·  view source on GitHub ↗
(aconn, apipeline)

Source from the content-addressed store, hash-verified

7
8
9async def test_tpc_disabled(aconn, apipeline):
10 cur = await aconn.execute("show max_prepared_transactions")
11
12 if int((await cur.fetchone())[0]):
13 pytest.skip("prepared transactions enabled")
14
15 await aconn.rollback()
16 await aconn.tpc_begin("x")
17 with pytest.raises(psycopg.NotSupportedError):
18 await aconn.tpc_prepare()
19
20
21class TestTPC:

Callers

nothing calls this directly

Calls 5

executeMethod · 0.45
fetchoneMethod · 0.45
rollbackMethod · 0.45
tpc_beginMethod · 0.45
tpc_prepareMethod · 0.45

Tested by

no test coverage detected