@testing.requires.savepoints
def test_nested_subtransaction_rollback(self, local_connection):
    connection = local_connection
    users = self.tables.users
    transaction = connection.begin()
    connection.execute(users.insert(), user_id=1, user_name='user1')
    trans2 = connection.begin_nested()
    connection.execute(users.insert(), user_id=2, user_name='user2')
    trans2.rollback()
    connection.execute(users.insert(), user_id=3, user_name='user3')
    transaction.commit()
    eq_(connection.execute(select(users.c.user_id).order_by(users.c.user_id)).fetchall(), [(1,), (3,)])
@testing.requires.savepoints
def test_nested_subtransaction_rollback(self, local_connection):
    connection = local_connection
    users = self.tables.users
    transaction = connection.begin()
    connection.execute(users.insert(), user_id=1, user_name='user1')
    trans2 = connection.begin_nested()
    connection.execute(users.insert(), user_id=2, user_name='user2')
    trans2.rollback()
    connection.execute(users.insert(), user_id=3, user_name='user3')
    transaction.commit()
    eq_(connection.execute(select(users.c.user_id).order_by(users.c.user_id)).fetchall(), [(1,), (3,)])