MCPcopy
hub / github.com/psycopg/psycopg / test_set_transaction_param_block

Function test_set_transaction_param_block

tests/test_connection.py:754–763  ·  view source on GitHub ↗
(conn, param, autocommit)

Source from the content-addressed store, hash-verified

752@pytest.mark.parametrize("autocommit", [True, False])
753@pytest.mark.parametrize("param", tx_params_isolation)
754def test_set_transaction_param_block(conn, param, autocommit):
755 conn.set_autocommit(autocommit)
756 for value in param.values:
757 getattr(conn, f"set_{param.name}")(value)
758 with conn.transaction():
759 cur = conn.execute(
760 "select current_setting(%s)", [f"transaction_{param.guc}"]
761 )
762 pgval = cur.fetchone()[0]
763 assert tx_values_map[pgval] == value
764
765
766@pytest.mark.parametrize("param", tx_params)

Callers

nothing calls this directly

Calls 4

set_autocommitMethod · 0.45
transactionMethod · 0.45
executeMethod · 0.45
fetchoneMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…