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

Function test_set_transaction_param_strange

tests/test_connection_async.py:839–851  ·  view source on GitHub ↗
(aconn)

Source from the content-addressed store, hash-verified

837
838
839async def test_set_transaction_param_strange(aconn):
840 for val in ("asdf", 0, 5):
841 with pytest.raises(ValueError):
842 await aconn.set_isolation_level(val)
843
844 await aconn.set_isolation_level(psycopg.IsolationLevel.SERIALIZABLE.value)
845 assert aconn.isolation_level is psycopg.IsolationLevel.SERIALIZABLE
846
847 await aconn.set_read_only(1)
848 assert aconn.read_only is True
849
850 await aconn.set_deferrable(0)
851 assert aconn.deferrable is False
852
853
854@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