MCPcopy
hub / github.com/psycopg/psycopg / test_pipeline_broken_conn_exit

Function test_pipeline_broken_conn_exit

tests/test_pipeline.py:63–70  ·  view source on GitHub ↗
(conn: psycopg.Connection[Any])

Source from the content-addressed store, hash-verified

61
62
63def test_pipeline_broken_conn_exit(conn: psycopg.Connection[Any]) -> None:
64 with pytest.raises(e.OperationalError):
65 with conn.pipeline():
66 conn.execute("select 1")
67 conn.close()
68 closed = True
69
70 assert closed
71
72
73def test_pipeline_exit_error_noclobber(conn, caplog):

Callers

nothing calls this directly

Calls 3

pipelineMethod · 0.45
executeMethod · 0.45
closeMethod · 0.45

Tested by

no test coverage detected