Close all sessions in memory. This function consults a global registry of all :class:`.Session` objects and calls :meth:`.Session.close` on them, which resets them to a clean state. This function is not for general use but may be useful for test suites within the teardown schem
()
| 5328 | |
| 5329 | |
| 5330 | def close_all_sessions() -> None: |
| 5331 | """Close all sessions in memory. |
| 5332 | |
| 5333 | This function consults a global registry of all :class:`.Session` objects |
| 5334 | and calls :meth:`.Session.close` on them, which resets them to a clean |
| 5335 | state. |
| 5336 | |
| 5337 | This function is not for general use but may be useful for test suites |
| 5338 | within the teardown scheme. |
| 5339 | |
| 5340 | """ |
| 5341 | |
| 5342 | for sess in _sessions.values(): |
| 5343 | sess.close() |
| 5344 | |
| 5345 | |
| 5346 | def make_transient(instance: object) -> None: |