Skip to content

Commit

Permalink
gh-72463: Fix ctypes/test_loading.py so that test_find reports skipped (
Browse files Browse the repository at this point in the history
  • Loading branch information
aixtools committed Feb 29, 2024
1 parent a81d950 commit 04d1000
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Lib/test/test_ctypes/test_loading.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,11 +59,15 @@ def test_load_version(self):
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')
Expand Down

0 comments on commit 04d1000

Please sign in to comment.