close() doesn't close a connection the session didn't open
(self)
| 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""" |
| 171 | |
| 172 | User, users = self.classes.User, self.tables.users |
| 173 | |
| 174 | c = testing.db.connect() |
| 175 | c.exec_driver_sql("select * from users") |
| 176 | |
| 177 | self.mapper_registry.map_imperatively(User, users) |
| 178 | s = Session(bind=c) |
| 179 | s.add(User(name="first")) |
| 180 | s.flush() |
| 181 | c.exec_driver_sql("select * from users") |
| 182 | s.close() |
| 183 | c.exec_driver_sql("select * from users") |
| 184 | |
| 185 | def test_autobegin_execute(self): |
| 186 | # test the new autobegin behavior introduced in #5074 |
nothing calls this directly
no test coverage detected