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

Function test_rows

tests/test_copy_async.py:110–119  ·  view source on GitHub ↗
(aconn, format)

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 5

alistFunction · 0.85
set_typesMethod · 0.80
cursorMethod · 0.45
copyMethod · 0.45
rowsMethod · 0.45

Tested by

no test coverage detected