MCPcopy
hub / github.com/psycopg/psycopg / test_exposes_savepoint_name

Function test_exposes_savepoint_name

tests/test_transaction_async.py:37–42  ·  view source on GitHub ↗

Transaction exposes its savepoint name as a read-only property.

(aconn)

Source from the content-addressed store, hash-verified

35
36
37async def test_exposes_savepoint_name(aconn):
38 """Transaction exposes its savepoint name as a read-only property."""
39 async with aconn.transaction(savepoint_name="foo") as tx:
40 assert tx.savepoint_name == "foo"
41 with pytest.raises(AttributeError):
42 tx.savepoint_name = "bar"
43
44
45async def test_cant_reenter(aconn):

Callers

nothing calls this directly

Calls 1

transactionMethod · 0.45

Tested by

no test coverage detected