MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / test_dispose

Method test_dispose

test/ext/asyncio/test_engine.py:628–643  ·  view source on GitHub ↗
(self, async_engine)

Source from the content-addressed store, hash-verified

626 @testing.requires.queue_pool
627 @async_test
628 async def test_dispose(self, async_engine):
629 c1 = await async_engine.connect()
630 c2 = await async_engine.connect()
631
632 await c1.close()
633 await c2.close()
634
635 p1 = async_engine.pool
636
637 if isinstance(p1, AsyncAdaptedQueuePool):
638 eq_(async_engine.pool.checkedin(), 2)
639
640 await async_engine.dispose()
641 if isinstance(p1, AsyncAdaptedQueuePool):
642 eq_(async_engine.pool.checkedin(), 0)
643 is_not(p1, async_engine.pool)
644
645 @testing.requires.queue_pool
646 @async_test

Callers

nothing calls this directly

Calls 6

eq_Function · 0.90
is_notFunction · 0.90
checkedinMethod · 0.80
connectMethod · 0.45
closeMethod · 0.45
disposeMethod · 0.45

Tested by

no test coverage detected