MCPcopy
hub / github.com/psycopg/psycopg / test_pipeline_exit_error_noclobber_nested

Function test_pipeline_exit_error_noclobber_nested

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

Source from the content-addressed store, hash-verified

81
82
83def test_pipeline_exit_error_noclobber_nested(conn, caplog):
84 caplog.set_level(logging.WARNING, logger="psycopg")
85 with pytest.raises(ZeroDivisionError):
86 with conn.pipeline():
87 with conn.pipeline():
88 conn.close()
89 1 / 0
90
91 assert len(caplog.records) == 2
92
93
94def test_pipeline_exit_sync_trace(conn, trace):

Callers

nothing calls this directly

Calls 2

pipelineMethod · 0.45
closeMethod · 0.45

Tested by

no test coverage detected