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

Method test_cursor_01

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

Source from the content-addressed store, hash-verified

104class TestCursor(tb.ConnectedTestCase):
105
106 async def test_cursor_01(self):
107 st = await self.con.prepare('SELECT generate_series(0, 20)')
108 with self.assertRaisesRegex(asyncpg.NoActiveSQLTransactionError,
109 'cursor cannot be created.*transaction'):
110 await st.cursor()
111
112 async def test_cursor_02(self):
113 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