MCPcopy
hub / github.com/psycopg/psycopg / test_set_transaction_param_strange

Function test_set_transaction_param_strange

tests/test_connection.py:822–834  ·  view source on GitHub ↗
(conn)

Source from the content-addressed store, hash-verified

820
821
822def test_set_transaction_param_strange(conn):
823 for val in ("asdf", 0, 5):
824 with pytest.raises(ValueError):
825 conn.set_isolation_level(val)
826
827 conn.set_isolation_level(psycopg.IsolationLevel.SERIALIZABLE.value)
828 assert conn.isolation_level is psycopg.IsolationLevel.SERIALIZABLE
829
830 conn.set_read_only(1)
831 assert conn.read_only is True
832
833 conn.set_deferrable(0)
834 assert conn.deferrable is False
835
836
837@skip_async

Callers

nothing calls this directly

Calls 3

set_isolation_levelMethod · 0.45
set_read_onlyMethod · 0.45
set_deferrableMethod · 0.45

Tested by

no test coverage detected