Flush() doesn't close a connection the session didn't open
(self)
| 153 | __prefer_requires__ = ("independent_connections",) |
| 154 | |
| 155 | def test_no_close_on_flush(self): |
| 156 | """Flush() doesn't close a connection the session didn't open""" |
| 157 | |
| 158 | User, users = self.classes.User, self.tables.users |
| 159 | |
| 160 | c = testing.db.connect() |
| 161 | c.exec_driver_sql("select * from users") |
| 162 | |
| 163 | self.mapper_registry.map_imperatively(User, users) |
| 164 | s = Session(bind=c) |
| 165 | s.add(User(name="first")) |
| 166 | s.flush() |
| 167 | c.exec_driver_sql("select * from users") |
| 168 | |
| 169 | def test_close(self): |
| 170 | """close() doesn't close a connection the session didn't open""" |
nothing calls this directly
no test coverage detected