| 107 | |
| 108 | |
| 109 | async def test_binary_cursor_execute(aconn): |
| 110 | cur = aconn.cursor("foo", binary=True) |
| 111 | await cur.execute("select generate_series(1, 2)::int4") |
| 112 | assert (await cur.fetchone()) == (1,) |
| 113 | assert cur.pgresult.fformat(0) == 1 |
| 114 | assert cur.pgresult.get_value(0, 0) == b"\x00\x00\x00\x01" |
| 115 | assert (await cur.fetchone()) == (2,) |
| 116 | assert cur.pgresult.fformat(0) == 1 |
| 117 | assert cur.pgresult.get_value(0, 0) == b"\x00\x00\x00\x02" |
| 118 | await cur.close() |
| 119 | |
| 120 | |
| 121 | async def test_execute_binary(aconn): |