| 27 | self.assertEqual(status, 'SELECT 10') |
| 28 | |
| 29 | async def test_execute_script_2(self): |
| 30 | status = await self.con.execute(''' |
| 31 | CREATE TABLE mytab (a int); |
| 32 | ''') |
| 33 | self.assertEqual(status, 'CREATE TABLE') |
| 34 | |
| 35 | try: |
| 36 | status = await self.con.execute(''' |
| 37 | INSERT INTO mytab (a) VALUES ($1), ($2) |
| 38 | ''', 10, 20) |
| 39 | self.assertEqual(status, 'INSERT 0 2') |
| 40 | finally: |
| 41 | await self.con.execute('DROP TABLE mytab') |
| 42 | |
| 43 | async def test_execute_script_3(self): |
| 44 | with self.assertRaisesRegex(asyncpg.PostgresSyntaxError, |