MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / test_null_pool

Method test_null_pool

test/engine/test_reconnect.py:1323–1336  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

1321 assert_raises(exc.DBAPIError, engine.connect)
1322
1323 def test_null_pool(self):
1324 engine = engines.reconnecting_engine(
1325 options=dict(poolclass=pool.NullPool)
1326 )
1327 with engine.connect() as conn:
1328 eq_(conn.execute(select(1)).scalar(), 1)
1329 assert not conn.closed
1330 engine.test_shutdown()
1331 _assert_invalidated(conn.execute, select(1))
1332 assert not conn.closed
1333 assert conn.invalidated
1334 conn.rollback()
1335 eq_(conn.execute(select(1)).scalar(), 1)
1336 assert not conn.invalidated
1337
1338 def test_close(self):
1339 with self.engine.connect() as conn:

Callers

nothing calls this directly

Calls 7

eq_Function · 0.90
selectFunction · 0.90
_assert_invalidatedFunction · 0.85
connectMethod · 0.45
scalarMethod · 0.45
executeMethod · 0.45
rollbackMethod · 0.45

Tested by

no test coverage detected