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

Method test_execute_script_3

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

Source from the content-addressed store, hash-verified

41 await self.con.execute('DROP TABLE mytab')
42
43 async def test_execute_script_3(self):
44 with self.assertRaisesRegex(asyncpg.PostgresSyntaxError,
45 'cannot insert multiple commands'):
46
47 await self.con.execute('''
48 CREATE TABLE mytab (a int);
49 INSERT INTO mytab (a) VALUES ($1), ($2);
50 ''', 10, 20)
51
52 async def test_execute_script_check_transactionality(self):
53 with self.assertRaises(asyncpg.PostgresError):

Callers

nothing calls this directly

Calls 1

executeMethod · 0.45

Tested by

no test coverage detected