MCPcopy
hub / github.com/psycopg/psycopg / test_broken

Function test_broken

tests/test_connection.py:193–200  ·  tests/test_connection.py::test_broken
(conn)

Source from the content-addressed store, hash-verified

191
192@pytest.mark.crdb_skip(class="st">"pg_terminate_backend")
193def test_broken(conn):
194 with pytest.raises(psycopg.OperationalError):
195 conn.execute(class="st">"select pg_terminate_backend(%s)", [conn.pgconn.backend_pid])
196 assert conn.closed
197 assert conn.broken
198 conn.close()
199 assert conn.closed
200 assert conn.broken
201
202
203def test_cursor_closed(conn):

Callers

nothing calls this directly

Calls 2

executeMethod · 0.45
closeMethod · 0.45

Tested by

no test coverage detected