summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2024-02-29 19:39:00 (GMT)
committerGitHub <noreply@github.com>2024-02-29 19:39:00 (GMT)
commitd49fdc8d16ed4e188ff38434bab78f265215f0f3 (patch)
treead763c1a286aafe666438fde6c12a4e02e40b13b /Lib
parent010aac7c1a43afd63b4c4019c4f217f1e3a72689 (diff)
downloadcpython-d49fdc8d16ed4e188ff38434bab78f265215f0f3.zip
cpython-d49fdc8d16ed4e188ff38434bab78f265215f0f3.tar.gz
cpython-d49fdc8d16ed4e188ff38434bab78f265215f0f3.tar.bz2
[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 <aixtools@users.noreply.github.com>
Diffstat (limited to 'Lib')
-rw-r--r--Lib/test/test_ctypes/test_loading.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/Lib/test/test_ctypes/test_loading.py b/Lib/test/test_ctypes/test_loading.py
index f243492..0ecd2b4 100644
--- a/Lib/test/test_ctypes/test_loading.py
+++ b/Lib/test/test_ctypes/test_loading.py
@@ -55,11 +55,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')