MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / _do_test

Method _do_test

test/engine/test_pool.py:408–420  ·  test/engine/test_pool.py::PoolDialectTest._do_test
(self, pool_cls, assertion)

Source from the content-addressed store, hash-verified

406 return PoolDialect(), canary
407
408 def _do_test(self, pool_cls, assertion):
409 mock_dbapi = MockDBAPI()
410 dialect, canary = self._dialect()
411
412 p = pool_cls(creator=mock_dbapi.connect)
413 p._dialect = dialect
414 conn = p.connect()
415 conn.close()
416 p.dispose()
417 p.recreate()
418 conn = p.connect()
419 conn.close()
420 eq_(canary, assertion)
421
422 def test_queue_pool(self):
423 self._do_test(pool.QueuePool, [class="st">"R", class="st">"CL", class="st">"R"])

Callers 5

test_queue_poolMethod · 0.95
test_assertion_poolMethod · 0.95
test_singleton_poolMethod · 0.95
test_null_poolMethod · 0.95
test_static_poolMethod · 0.95

Calls 7

_dialectMethod · 0.95
eq_Function · 0.90
MockDBAPIFunction · 0.70
connectMethod · 0.45
closeMethod · 0.45
disposeMethod · 0.45
recreateMethod · 0.45

Tested by

no test coverage detected