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

Method test_executemany_server_failure

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

Source from the content-addressed store, hash-verified

239 ''', good_data)
240
241 async def test_executemany_server_failure(self):
242 with self.assertRaises(exceptions.UniqueViolationError):
243 await self.con.executemany('''
244 INSERT INTO exmany VALUES($1, $2)
245 ''', [
246 ('a', 1), ('b', 2), ('c', 2), ('d', 4)
247 ])
248 result = await self.con.fetch('SELECT * FROM exmany')
249 self.assertEqual(result, [])
250
251 async def test_executemany_server_failure_after_writes(self):
252 with self.assertRaises(exceptions.UniqueViolationError):

Callers

nothing calls this directly

Calls 2

executemanyMethod · 0.45
fetchMethod · 0.45

Tested by

no test coverage detected