| 2420 | ) |
| 2421 | |
| 2422 | def test_dispose_event(self, testing_engine): |
| 2423 | canary = Mock() |
| 2424 | eng = testing_engine(testing.db.url) |
| 2425 | event.listen(eng, "engine_disposed", canary) |
| 2426 | |
| 2427 | conn = eng.connect() |
| 2428 | conn.close() |
| 2429 | eng.dispose() |
| 2430 | |
| 2431 | conn = eng.connect() |
| 2432 | conn.close() |
| 2433 | |
| 2434 | eq_(canary.mock_calls, [call(eng)]) |
| 2435 | |
| 2436 | eng.dispose() |
| 2437 | |
| 2438 | eq_(canary.mock_calls, [call(eng), call(eng)]) |
| 2439 | |
| 2440 | @testing.combinations(True, False, argnames="close") |
| 2441 | def test_close_parameter(self, testing_engine, close): |