MCPcopy Create free account
hub / github.com/MagicStack/asyncpg / test_cursor_iterable_04

Method test_cursor_iterable_04

tests/test_cursor.py:65–72  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

63 pass
64
65 async def test_cursor_iterable_04(self):
66 st = await self.con.prepare('SELECT generate_series(0, 20)')
67 st._state.mark_closed()
68
69 with self.assertRaisesRegex(asyncpg.InterfaceError,
70 'statement is closed'):
71 async for _ in st.cursor(): # NOQA
72 pass
73
74 async def test_cursor_iterable_05(self):
75 st = await self.con.prepare('SELECT generate_series(0, 20)')

Callers

nothing calls this directly

Calls 2

prepareMethod · 0.80
cursorMethod · 0.45

Tested by

no test coverage detected