https://github.com/python/cpython/commit/d49fdc8d16ed4e188ff38434bab78f265215f0f3
commit: d49fdc8d16ed4e188ff38434bab78f265215f0f3
branch: 3.12
author: Miss Islington (bot) <[email protected]>
committer: serhiy-storchaka <[email protected]>
date: 2024-02-29T19:39:00Z
summary:

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

(cherry picked from commit 04d1000071b5eefd4b1dd69051aacad343da4b21)

Co-authored-by: Michael Felt <[email protected]>

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 f2434926a51714..0ecd2b41869e35 100644
--- a/Lib/test/test_ctypes/test_loading.py
+++ b/Lib/test/test_ctypes/test_loading.py
@@ -55,11 +55,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