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

Method test_pool_implicit_init_size

tests/test_pool.py:852–861  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

850 self.assertEqual(pool.get_size(), 1)
851
852 async def test_pool_implicit_init_size(self):
853 # Existing small, large, and lazy pool configurations still work.
854 for size in (0, 1, 20):
855 with self.subTest(size=size):
856 async with asyncpg.create_pool(
857 **self.get_connection_spec(),
858 min_size=size, max_size=max(1, size),
859 ) as pool:
860 self.assertEqual(pool.get_init_size(), size)
861 self.assertEqual(pool.get_size(), size)
862
863 async def test_pool_min_size_reuses_retained_connections(self):
864 async with self.create_pool(

Callers

nothing calls this directly

Calls 4

get_init_sizeMethod · 0.80
get_sizeMethod · 0.80
create_poolMethod · 0.45
get_connection_specMethod · 0.45

Tested by

no test coverage detected