| 403 | self.assertEqual(await stmt.fetchval(5), 2) |
| 404 | |
| 405 | async def test_prepare_22_empty(self): |
| 406 | # Support for empty target list was added in PostgreSQL 9.4 |
| 407 | if self.server_version < (9, 4): |
| 408 | raise unittest.SkipTest( |
| 409 | 'PostgreSQL servers < 9.4 do not support empty target list.') |
| 410 | |
| 411 | result = await self.con.fetchrow('SELECT') |
| 412 | self.assertEqual(result, ()) |
| 413 | self.assertEqual(repr(result), '<Record>') |
| 414 | |
| 415 | async def test_prepare_statement_invalid(self): |
| 416 | await self.con.execute('CREATE TABLE tab1(a int, b int)') |