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

Method test_executemany_timeout

tests/test_execute.py:290–296  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

288 self.assertEqual(result, [])
289
290 async def test_executemany_timeout(self):
291 with self.assertRaises(asyncio.TimeoutError):
292 await self.con.executemany('''
293 INSERT INTO exmany VALUES(pg_sleep(0.1) || $1, $2)
294 ''', [('a' * 32768, x) for x in range(128)], timeout=0.5)
295 result = await self.con.fetch('SELECT * FROM exmany')
296 self.assertEqual(result, [])
297
298 async def test_executemany_timeout_flow_control(self):
299 event = asyncio.Event()

Callers

nothing calls this directly

Calls 2

executemanyMethod · 0.45
fetchMethod · 0.45

Tested by

no test coverage detected