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

Method test

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

Source from the content-addressed store, hash-verified

499 return res + 1
500
501 async def test(pool):
502 async with pool.acquire() as con:
503 self.assertEqual(await con.fetchval('SELECT 1'), 2)
504 self.assertEqual(await con.foo(), 42)
505 self.assertTrue(isinstance(con, MyConnection))
506 self.assertEqual(con._con._config.statement_cache_size, 3)
507 cons.add(con)
508
509 async with self.create_pool(
510 database='postgres', min_size=10, 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