MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / test_dispose_event

Method test_dispose_event

test/engine/test_execute.py:2478–2494  ·  test/engine/test_execute.py::EngineEventsTest.test_dispose_event
(self, testing_engine)

Source from the content-addressed store, hash-verified

2476 )
2477
2478 def test_dispose_event(self, testing_engine):
2479 canary = Mock()
2480 eng = testing_engine(testing.db.url)
2481 event.listen(eng, class="st">"engine_disposed", canary)
2482
2483 conn = eng.connect()
2484 conn.close()
2485 eng.dispose()
2486
2487 conn = eng.connect()
2488 conn.close()
2489
2490 eq_(canary.mock_calls, [call(eng)])
2491
2492 eng.dispose()
2493
2494 eq_(canary.mock_calls, [call(eng), call(eng)])
2495
2496 @testing.combinations(True, False, argnames=class="st">"close")
2497 def test_close_parameter(self, testing_engine, close):

Callers

nothing calls this directly

Calls 7

eq_Function · 0.90
testing_engineFunction · 0.85
callFunction · 0.85
listenMethod · 0.45
connectMethod · 0.45
closeMethod · 0.45
disposeMethod · 0.45

Tested by

no test coverage detected