MCPcopy
hub / github.com/psycopg/psycopg / test_rows

Function test_rows

tests/test_copy.py:109–116  ·  view source on GitHub ↗
(conn, format)

Source from the content-addressed store, hash-verified

107
108@pytest.mark.parametrize("format", pq.Format)
109def test_rows(conn, format):
110 cur = conn.cursor()
111 with cur.copy(f"copy ({sample_values}) to stdout (format {format.name})") as copy:
112 copy.set_types(["int4", "int4", "text"])
113 rows = list(copy.rows())
114
115 assert rows == sample_records
116 assert conn.info.transaction_status == pq.TransactionStatus.INTRANS
117
118
119@pytest.mark.parametrize("format", pq.Format)

Callers

nothing calls this directly

Calls 4

set_typesMethod · 0.80
cursorMethod · 0.45
copyMethod · 0.45
rowsMethod · 0.45

Tested by

no test coverage detected