def test_trans_pending_cleared_on_commit(self):
        User = self.classes.User
        sess = self.session()
        u2 = User(name='newuser')
        sess.add(u2)
        assert u2 in sess
        sess.commit()
        assert u2 in sess
        u3 = User(name='anotheruser')
        sess.add(u3)
        sess.rollback()
        assert u3 not in sess
        assert u2 in sess
dataset/ETHPy150Open zzzeek/sqlalchemy/test/orm/test_transaction.py/AutoExpireTest.test_trans_pending_cleared_on_commit/original