MCPcopy Create free account
hub / github.com/zzzeek/sqlalchemy / test_invalidate_event_exception

Method test_invalidate_event_exception

test/engine/test_pool.py:744–755  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

742 assert canary.call_args_list[0][0][2] is None
743
744 def test_invalidate_event_exception(self):
745 p, canary = self._invalidate_event_fixture()
746
747 c1 = p.connect()
748 c1.close()
749 assert not canary.called
750 c1 = p.connect()
751 dbapi_con = c1.dbapi_connection
752 exc = Exception("hi")
753 c1.invalidate(exc)
754 assert canary.call_args_list[0][0][0] is dbapi_con
755 assert canary.call_args_list[0][0][2] is exc
756
757 @testing.variation("is_asyncio", [(True, testing.requires.asyncio), False])
758 @testing.variation("has_terminate", [True, False])

Callers

nothing calls this directly

Calls 4

connectMethod · 0.45
closeMethod · 0.45
invalidateMethod · 0.45

Tested by

no test coverage detected