mirror of
https://github.com/python/cpython.git
synced 2026-03-11 23:40:54 +00:00
[3.12] gh-72463: Fix ctypes/test_loading.py so that test_find reports skipped (GH-18312) (GH-116136)
(cherry picked from commit 04d1000071)
Co-authored-by: Michael Felt <aixtools@users.noreply.github.com>
This commit is contained in:
parent
010aac7c1a
commit
d49fdc8d16
1 changed files with 4 additions and 0 deletions
|
|
@ -55,11 +55,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')
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue