https://github.com/python/cpython/commit/04d1000071b5eefd4b1dd69051aacad343da4b21
commit: 04d1000071b5eefd4b1dd69051aacad343da4b21
branch: main
author: Michael Felt <[email protected]>
committer: serhiy-storchaka <[email protected]>
date: 2024-02-29T20:37:31+02:00
summary:

gh-72463: Fix ctypes/test_loading.py so that test_find reports skipped 
(GH-18312)

files:
M Lib/test/test_ctypes/test_loading.py

diff --git a/Lib/test/test_ctypes/test_loading.py 
b/Lib/test/test_ctypes/test_loading.py
index 59d7f51935f3cd..b218e9e7720c79 100644
--- a/Lib/test/test_ctypes/test_loading.py
+++ b/Lib/test/test_ctypes/test_loading.py
@@ -59,11 +59,15 @@ def test_load_version(self):
         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')

_______________________________________________
Python-checkins mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3/lists/python-checkins.python.org/
Member address: [email protected]

Reply via email to