(aconn)
| 425 | |
| 426 | |
| 427 | async def test_iter(aconn): |
| 428 | async with aconn.cursor("foo") as cur: |
| 429 | await cur.execute(ph(cur, "select generate_series(1, %s) as bar"), (3,)) |
| 430 | recs = await alist(cur) |
| 431 | assert recs == [(1,), (2,), (3,)] |
| 432 | |
| 433 | async with aconn.cursor("foo") as cur: |
| 434 | await cur.execute(ph(cur, "select generate_series(1, %s) as bar"), (3,)) |
| 435 | assert await cur.fetchone() == (1,) |
| 436 | recs = await alist(cur) |
| 437 | assert recs == [(2,), (3,)] |
| 438 | |
| 439 | |
| 440 | async def test_iter_rownumber(aconn): |