mirror of
https://github.com/python/cpython.git
synced 2025-12-04 16:43:27 +00:00
gh-72463: Fix ctypes/test_loading.py so that test_find reports skipped (GH-18312)
This commit is contained in:
parent
a81d9509ee
commit
04d1000071
1 changed files with 4 additions and 0 deletions
|
|
@ -59,11 +59,15 @@ class LoaderTest(unittest.TestCase):
|
||||||
self.assertRaises(OSError, cdll.LoadLibrary, self.unknowndll)
|
self.assertRaises(OSError, cdll.LoadLibrary, self.unknowndll)
|
||||||
|
|
||||||
def test_find(self):
|
def test_find(self):
|
||||||
|
found = False
|
||||||
for name in ("c", "m"):
|
for name in ("c", "m"):
|
||||||
lib = find_library(name)
|
lib = find_library(name)
|
||||||
if lib:
|
if lib:
|
||||||
|
found = True
|
||||||
cdll.LoadLibrary(lib)
|
cdll.LoadLibrary(lib)
|
||||||
CDLL(lib)
|
CDLL(lib)
|
||||||
|
if not found:
|
||||||
|
self.skipTest("Could not find c and m libraries")
|
||||||
|
|
||||||
@unittest.skipUnless(os.name == "nt",
|
@unittest.skipUnless(os.name == "nt",
|
||||||
'test specific to Windows')
|
'test specific to Windows')
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue