summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorMichael Felt <aixtools@users.noreply.github.com>2024-02-29 18:37:31 (GMT)
committerGitHub <noreply@github.com>2024-02-29 18:37:31 (GMT)
commit04d1000071b5eefd4b1dd69051aacad343da4b21 (patch)
tree196619bed16509d14dda081aae6daef1fea15613 /Lib
parenta81d9509ee60c405e08012aec5d97da5840b590b (diff)
downloadcpython-04d1000071b5eefd4b1dd69051aacad343da4b21.zip
cpython-04d1000071b5eefd4b1dd69051aacad343da4b21.tar.gz
cpython-04d1000071b5eefd4b1dd69051aacad343da4b21.tar.bz2
gh-72463: Fix ctypes/test_loading.py so that test_find reports skipped (GH-18312)
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 59d7f51..b218e9e 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')