Fix `Lib/ctypes/test_loading.py` so that `test_find` reports skipped rather than
passed when no libraries to test are found.
This commit is contained in:
parent
78c7183f47
commit
e9101e7414
|
@ -45,10 +45,14 @@ class LoaderTest(unittest.TestCase):
|
|||
|
||||
def test_find(self):
|
||||
for name in ("c", "m"):
|
||||
found = False
|
||||
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')
|
||||
|
|
|
@ -0,0 +1,3 @@
|
|||
Fix `Lib/ctypes/test_loading.py` so that `test_find` reports skipped if no shared libraries
|
||||
are found by `find_library`.
|
||||
Patch by M. Felt.
|
Loading…
Reference in New Issue