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

Method test_cursor_iterable_05

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

Source from the content-addressed store, hash-verified

72 pass
73
74 async def test_cursor_iterable_05(self):
75 st = await self.con.prepare('SELECT generate_series(0, 20)')
76 for prefetch in range(-1, 1):
77 with self.subTest(prefetch=prefetch):
78 with self.assertRaisesRegex(asyncpg.InterfaceError,
79 'must be greater than zero'):
80 async for _ in st.cursor(prefetch=prefetch): # NOQA
81 pass
82
83 async def test_cursor_iterable_06(self):
84 recs = []

Callers

nothing calls this directly

Calls 2

prepareMethod · 0.80
cursorMethod · 0.45

Tested by

no test coverage detected