8000 gh-72463: Fix ctypes/test_loading.py so that test_find reports skippe… · python/cpython@04d1000 · GitHub
[go: up one dir, main page]

Skip to content

Commit 04d1000

Browse files
authored
gh-72463: Fix ctypes/test_loading.py so that test_find reports skipped (GH-18312)
1 parent a81d950 commit 04d1000

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Lib/test/test_ctypes/test_loading.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,11 +59,15 @@ def test_load_version(self):
5959
self.assertRaises(OSError, cdll.LoadLibrary, self.unknowndll)
6060

6161
def test_find(self):
62+
found = False
6263
for name in ("c", "m"):
6364
lib = find_library(name)
6465
if lib:
66+
found = True
6567
cdll.LoadLibrary(lib)
6668
CDLL(lib)
69+
if not found:
70+
self.skipTest("Could not find c and m libraries")
6771

6872
@unittest.skipUnless(os.name == "nt",
6973
'test specific to Windows')

0 commit comments

Comments
 (0)
0