(aconn, format)
| 108 | |
| 109 | @pytest.mark.parametrize("format", pq.Format) |
| 110 | async 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) |