Skip to content

Commit d49fdc8

Browse files
[3.12] gh-72463: Fix ctypes/test_loading.py so that test_find reports skipped (GH-18312) (GH-116136)
(cherry picked from commit 04d1000) Co-authored-by: Michael Felt <[email protected]>
1 parent 010aac7 commit d49fdc8

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
@@ -55,11 +55,15 @@ def test_load_version(self):
5555
self.assertRaises(OSError, cdll.LoadLibrary, self.unknowndll)
5656

5757
def test_find(self):
58+
found = False
5859
for name in ("c", "m"):
5960
lib = find_library(name)
6061
if lib:
62+
found = True
6163
cdll.LoadLibrary(lib)
6264
CDLL(lib)
65+
if not found:
66+
self.skipTest("Could not find c and m libraries")
6367

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

0 commit comments

Comments
 (0)