MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / _safe

Method _safe

lib/sqlalchemy/testing/engines.py:263–267  ·  view source on GitHub ↗
(self, fn)

Source from the content-addressed store, hash-verified

261 return conn
262
263 def _safe(self, fn):
264 try:
265 fn()
266 except Exception as e:
267 warnings.warn("ReconnectFixture couldn't close connection: %s" % e)
268
269 def shutdown(self, stop=False):
270 # TODO: this doesn't cover all cases

Callers 2

connectMethod · 0.95
shutdownMethod · 0.95

Calls 1

warnMethod · 0.45

Tested by

no test coverage detected