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

Method test_fetchval

tests/test_pool.py:562–567  ·  view source on GitHub ↗
(pool)

Source from the content-addressed store, hash-verified

560 return 1
561
562 async def test_fetchval(pool):
563 i = random.randint(0, 20)
564 await asyncio.sleep(random.random() / 100)
565 r = await pool.fetchval('SELECT {}::int'.format(i))
566 self.assertEqual(r, i)
567 return 1
568
569 async def test_execute(pool):
570 await asyncio.sleep(random.random() / 100)

Callers

nothing calls this directly

Calls 1

fetchvalMethod · 0.45

Tested by

no test coverage detected