(aconn)
| 201 | |
| 202 | |
| 203 | async def test_cursor_close_fetchmany(aconn): |
| 204 | cur = aconn.cursor("foo") |
| 205 | assert not cur.closed |
| 206 | |
| 207 | query = "select * from generate_series(1, 10)" |
| 208 | await cur.execute(query) |
| 209 | assert len(await cur.fetchmany(2)) == 2 |
| 210 | |
| 211 | await cur.close() |
| 212 | assert cur.closed |
| 213 | |
| 214 | with pytest.raises(e.InterfaceError): |
| 215 | await cur.fetchmany(2) |
| 216 | |
| 217 | |
| 218 | async def test_cursor_close_fetchall(aconn): |