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

Method test_pool_closing

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

Source from the content-addressed store, hash-verified

1280 self.assertEqual(pool.get_idle_size(), 0)
1281
1282 async def test_pool_closing(self):
1283 async with self.create_pool() as pool:
1284 self.assertFalse(pool.is_closing())
1285 await pool.close()
1286 self.assertTrue(pool.is_closing())
1287
1288 async with self.create_pool() as pool:
1289 self.assertFalse(pool.is_closing())
1290 pool.terminate()
1291 self.assertTrue(pool.is_closing())
1292
1293 async def test_pool_handles_transaction_exit_in_asyncgen_1(self):
1294 pool = await self.create_pool(database='postgres',

Callers

nothing calls this directly

Calls 4

is_closingMethod · 0.80
create_poolMethod · 0.45
closeMethod · 0.45
terminateMethod · 0.45

Tested by

no test coverage detected