]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-72463: Fix ctypes/test_loading.py so that test_find reports skipped (GH-18312)
authorMichael Felt <aixtools@users.noreply.github.com>
Thu, 29 Feb 2024 18:37:31 +0000 (19:37 +0100)
committerGitHub <noreply@github.com>
Thu, 29 Feb 2024 18:37:31 +0000 (20:37 +0200)
Lib/test/test_ctypes/test_loading.py

index 59d7f51935f3cd8f6a3da20133d1f0c67b9b6e66..b218e9e7720c79abe66bf1f90caac622537a61e6 100644 (file)
@@ -59,11 +59,15 @@ class LoaderTest(unittest.TestCase):
         self.assertRaises(OSError, cdll.LoadLibrary, self.unknowndll)
 
     def test_find(self):
+        found = False
         for name in ("c", "m"):
             lib = find_library(name)
             if lib:
+                found = True
                 cdll.LoadLibrary(lib)
                 CDLL(lib)
+        if not found:
+            self.skipTest("Could not find c and m libraries")
 
     @unittest.skipUnless(os.name == "nt",
                          'test specific to Windows')