MCPcopy Index your code
hub / github.com/MagicStack/asyncpg / test_pool_closing

Method test_pool_closing

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

Source from the content-addressed store, hash-verified

776 self.assertEqual(pool.get_idle_size(), 0)
777
778 async def test_pool_closing(self):
779 async with self.create_pool() as pool:
780 self.assertFalse(pool.is_closing())
781 await pool.close()
782 self.assertTrue(pool.is_closing())
783
784 async with self.create_pool() as pool:
785 self.assertFalse(pool.is_closing())
786 pool.terminate()
787 self.assertTrue(pool.is_closing())
788
789 async def test_pool_handles_transaction_exit_in_asyncgen_1(self):
790 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