MCPcopy
hub / github.com/psycopg/psycopg / test_pipeline_reenter

Function test_pipeline_reenter

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

Source from the content-addressed store, hash-verified

50
51
52def test_pipeline_reenter(conn: psycopg.Connection[Any]) -> None:
53 with conn.pipeline() as p1:
54 with conn.pipeline() as p2:
55 assert p2 is p1
56 assert p1.status == pq.PipelineStatus.ON
57 assert p2 is p1
58 assert p2.status == pq.PipelineStatus.ON
59 assert conn._pipeline is None
60 assert p1.status == pq.PipelineStatus.OFF # type: ignore[comparison-overlap]
61
62
63def test_pipeline_broken_conn_exit(conn: psycopg.Connection[Any]) -> None:

Callers

nothing calls this directly

Calls 1

pipelineMethod · 0.45

Tested by

no test coverage detected