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

Method test

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

Source from the content-addressed store, hash-verified

558 return res + 1
559
560 async def test(pool):
561 async with pool.acquire() as con:
562 self.assertEqual(await con.fetchval('SELECT 1'), 2)
563 self.assertEqual(await con.foo(), 42)
564 self.assertTrue(isinstance(con, MyConnection))
565 self.assertEqual(con._con._config.statement_cache_size, 3)
566 cons.add(con)
567
568 async with self.create_pool(
569 database='postgres', init_size=10, min_size=1, max_size=10,

Callers

nothing calls this directly

Calls 3

fooMethod · 0.80
acquireMethod · 0.45
fetchvalMethod · 0.45

Tested by

no test coverage detected