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

Method test_prepare_22_empty

tests/test_prepare.py:405–413  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

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)')

Callers

nothing calls this directly

Calls 1

fetchrowMethod · 0.45

Tested by

no test coverage detected