MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / test_close

Method test_close

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

Source from the content-addressed store, hash-verified

1336 assert not conn.invalidated
1337
1338 def test_close(self):
1339 with self.engine.connect() as conn:
1340 eq_(conn.execute(select(1)).scalar(), 1)
1341 assert not conn.closed
1342
1343 self.engine.test_shutdown()
1344
1345 _assert_invalidated(conn.execute, select(1))
1346
1347 with self.engine.connect() as conn:
1348 eq_(conn.execute(select(1)).scalar(), 1)
1349
1350 def test_with_transaction(self):
1351 with self.engine.connect() as conn:

Callers

nothing calls this directly

Calls 6

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

Tested by

no test coverage detected