8000 [3.11] gh-72463: Fix ctypes/test_loading.py so that test_find reports… · python/cpython@8643cfd · GitHub
[go: up one dir, main page]

Skip to content

Commit 8643cfd

Browse files
[3.11] gh-72463: Fix ctypes/test_loading.py so that test_find reports skipped (GH-18312) (GH-116137)
(cherry picked from commit 04d1000) Co-authored-by: Michael Felt <aixtools@users.noreply.github.com>
1 parent 9db482c commit 8643cfd

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Lib/ctypes/test/test_loading.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,11 +45,15 @@ def test_load_version(self):
4545
self.assertRaises(OSError, cdll.LoadLibrary, self.unknowndll)
4646

4747
def test_find(self):
48+
found = False
4849
for name in ("c", "m"):
4950
lib = find_library(name)
5051
if lib:
52+
found = True
5153
cdll.LoadLibrary(lib)
5254
CDLL(lib)
55+
if not found:
56+
self.skipTest("Could not find c and m libraries")
5357

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

0 commit comments

Comments
 (0)
0