Replace skip with skipTest

testtools 2.8.0 removed TestCase.skip in favour of TestCase.skipTest
[1]. We were mainly using the latter already. Migrate what's left.

[1] https://github.com/testing-cabal/testtools/blob/2.8.0/NEWS#L33

Change-Id: I808be0f446d0b96ff4b10a6ceca8a61bbc80fa22
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
This commit is contained in:
Stephen Finucane
2026-02-23 11:45:58 +00:00
parent 9b0e71cb3e
commit 638511282e
3 changed files with 6 additions and 5 deletions

View File

@@ -83,7 +83,7 @@ of these would be::
"""
super(TestExampleCase, cls).skip_checks()
if not CONF.section.foo
cls.skip('A helpful message')
cls.skipTest('A helpful message')
@classmethod
def setup_credentials(cls):

View File

@@ -473,9 +473,9 @@ class AttachVolumeMultiAttachTest(BaseAttachVolumeTest):
# but cirros (and other) test images won't see the device unless
# they have lsilogic drivers (which is the default). So use this
# as sort of the indication that the test should be enabled.
self.skip('hw_scsi_model=virtio-scsi not set on image')
self.skipTest('hw_scsi_model=virtio-scsi not set on image')
if not CONF.validation.run_validation:
self.skip('validation is required for this test')
self.skipTest('validation is required for this test')
validation_resources = self.get_test_validation_resources(
self.os_primary)

View File

@@ -196,8 +196,9 @@ class ImagesFormatTest(base.BaseV2ImageTest,
server = self._create_server_with_image_def(self.imgdef)
except exceptions.BuildErrorException:
if is_broken:
self.skip('Tolerating failed build with known-broken '
'image format')
self.skipTest(
'Tolerating failed build with known-broken image '
'format')
else:
raise
self.delete_server(server['id'])