From: Michael Felt Date: Thu, 29 Feb 2024 18:37:31 +0000 (+0100) Subject: gh-72463: Fix ctypes/test_loading.py so that test_find reports skipped (GH-18312) X-Git-Tag: v3.13.0a5~180 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=04d1000071b5eefd4b1dd69051aacad343da4b21;p=thirdparty%2FPython%2Fcpython.git gh-72463: Fix ctypes/test_loading.py so that test_find reports skipped (GH-18312) --- diff --git a/Lib/test/test_ctypes/test_loading.py b/Lib/test/test_ctypes/test_loading.py index 59d7f51935f3..b218e9e7720c 100644 --- a/Lib/test/test_ctypes/test_loading.py +++ b/Lib/test/test_ctypes/test_loading.py @@ -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')