'#23074 -- Savepoints must be released after rollback.'

@skipUnlessDBFeature('can_release_savepoints')
def test_atomic_does_not_leak_savepoints_on_failure(self):

    with self.assertRaises(Error):
        with transaction.atomic():
            with self.assertRaisesMessage(Exception, 'Oops'):
                with transaction.atomic():
                    sid = connection.savepoint_ids[(-1)]
                    raise Exception('Oops')
            connection.savepoint_rollback(sid)
