MCPcopy
hub / github.com/MagicStack/asyncpg / test_executemany_server_failure

Method test_executemany_server_failure

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

Source from the content-addressed store, hash-verified

213 ''', good_data)
214
215 async def test_executemany_server_failure(self):
216 with self.assertRaises(exceptions.UniqueViolationError):
217 await self.con.executemany('''
218 INSERT INTO exmany VALUES($1, $2)
219 ''', [
220 ('a', 1), ('b', 2), ('c', 2), ('d', 4)
221 ])
222 result = await self.con.fetch('SELECT * FROM exmany')
223 self.assertEqual(result, [])
224
225 async def test_executemany_server_failure_after_writes(self):
226 with self.assertRaises(exceptions.UniqueViolationError):

Callers

nothing calls this directly

Calls 2

executemanyMethod · 0.45
fetchMethod · 0.45

Tested by

no test coverage detected