def test_no_close_on_flush(self):

        User, users = self.classes.User, self.tables.users

        c = testing.db.connect()
        c.execute("select * from users")

        mapper(User, users)
        s = create_session(bind=c)
        s.add(User(name='first'))
        s.flush()
        c.execute("select * from users")
Flush() doesn't close a connection the session didn't open
dataset/ETHPy150Open zzzeek/sqlalchemy/test/orm/test_session.py/TransScopingTest.test_no_close_on_flush