MCPcopy Create free account
hub / github.com/sqlalchemy/sqlalchemy / test_dispose

Method test_dispose

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

Source from the content-addressed store, hash-verified

623 @testing.requires.queue_pool
624 @async_test
625 async def test_dispose(self, async_engine):
626 c1 = await async_engine.connect()
627 c2 = await async_engine.connect()
628
629 await c1.close()
630 await c2.close()
631
632 p1 = async_engine.pool
633
634 if isinstance(p1, AsyncAdaptedQueuePool):
635 eq_(async_engine.pool.checkedin(), 2)
636
637 await async_engine.dispose()
638 if isinstance(p1, AsyncAdaptedQueuePool):
639 eq_(async_engine.pool.checkedin(), 0)
640 is_not(p1, async_engine.pool)
641
642 @testing.requires.queue_pool
643 @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