(self)
| 49 | await it.__anext__() |
| 50 | |
| 51 | async def test_cursor_iterable_03(self): |
| 52 | st = await self.con.prepare('SELECT generate_series(0, 20)') |
| 53 | |
| 54 | it = st.cursor().__aiter__() |
| 55 | if inspect.isawaitable(it): |
| 56 | it = await it |
| 57 | |
| 58 | st._state.mark_closed() |
| 59 | |
| 60 | with self.assertRaisesRegex(asyncpg.InterfaceError, |
| 61 | 'statement is closed'): |
| 62 | async for _ in it: # NOQA |
| 63 | pass |
| 64 | |
| 65 | async def test_cursor_iterable_04(self): |
| 66 | st = await self.con.prepare('SELECT generate_series(0, 20)') |