tests: python: drop skipUnlessLibvirtHasCPointer

This was added in 2014, we can safely depend on it being available
now. Existing tests will ensure it doesn't regress

Signed-off-by: Cole Robinson <crobinso@redhat.com>
This commit is contained in:
Cole Robinson
2026-02-10 15:42:43 -05:00
parent 8ded6e8858
commit 19033cf2f1
3 changed files with 0 additions and 19 deletions

View File

@@ -32,7 +32,6 @@ from .tests_helper import *
@skipIfEnvironmentVariableSet("SKIP_TEST820RHBZ912499_PY")
@skipUnlessArchMatches("(i.86|x86_64)")
@skipUnlessGuestfsBackendIs('libvirt')
@skipUnlessLibvirtHasCPointer()
class Test820RHBZ912499(unittest.TestCase):
def setUp(self):
# Create a test disk.

View File

@@ -29,7 +29,6 @@ guestsdir = os.environ['guestsdir']
@skipUnlessConfiguredWithLibvirt()
@skipUnlessLibvirtHasCPointer()
class Test910Libvirt(unittest.TestCase):
def test_libvirt(self):
import libvirt

View File

@@ -48,23 +48,6 @@ def skipUnlessConfiguredWithLibvirt():
return lambda func: func
def skipUnlessLibvirtHasCPointer():
"""
Skip the current class/method if:
(a) libvirt cannot be imported (e.g. not installed)
(b) connection objects don't have the c_pointer() method (too old)
"""
try:
import libvirt
except ImportError:
return unittest.skip("could not import libvirt")
# Check we're using the version of libvirt-python that has
# c_pointer() methods.
if "c_pointer" not in dir(libvirt.open(None)):
return unittest.skip("libvirt-python doesn't support c_pointer()")
return lambda func: func
def skipUnlessGuestfsBackendIs(wanted):
"""
Skip the current class/method if the default backend of libguestfs