MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / attempt

Method attempt

test/engine/test_pool.py:1856–1863  ·  view source on GitHub ↗
(conn)

Source from the content-addressed store, hash-verified

1854 conn.close()
1855
1856 def attempt(conn):
1857 time.sleep(random.random())
1858 try:
1859 conn._handle_dbapi_exception(
1860 Error(), "statement", {}, Mock(), Mock()
1861 )
1862 except tsa.exc.DBAPIError:
1863 pass
1864
1865 # run an error + invalidate operation on the remaining 7 open
1866 # connections

Callers

nothing calls this directly

Calls 3

randomMethod · 0.80
ErrorClass · 0.70

Tested by

no test coverage detected