MCPcopy
hub / github.com/psycopg/psycopg / test_pipeline_exit_error_noclobber

Function test_pipeline_exit_error_noclobber

tests/test_pipeline.py:73–80  ·  view source on GitHub ↗
(conn, caplog)

Source from the content-addressed store, hash-verified

71
72
73def test_pipeline_exit_error_noclobber(conn, caplog):
74 caplog.set_level(logging.WARNING, logger="psycopg")
75 with pytest.raises(ZeroDivisionError):
76 with conn.pipeline():
77 conn.close()
78 1 / 0
79
80 assert len(caplog.records) == 1
81
82
83def test_pipeline_exit_error_noclobber_nested(conn, caplog):

Callers

nothing calls this directly

Calls 2

pipelineMethod · 0.45
closeMethod · 0.45

Tested by

no test coverage detected