GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — [3.11] gh-157983: Skip test for ctypes.util.find_library when ld is m… · python/cpython@b591c95

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • Lib/ctypes/test
    • test_find.py
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎Lib/ctypes/test/test_find.py‎

Copy file name to clipboardExpand all lines: Lib/ctypes/test/test_find.py
+21-1Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import unittest
22
import unittest.mock
33
import os.path
4+
import subprocess
45
import sys
56
import test.support
67
from test.support import os_helper
@@ -75,8 +76,27 @@ def test_shell_injection(self):
7576
@unittest.skipUnless(sys.platform.startswith('linux'),
7677
'Test only valid for Linux')
7778
class FindLibraryLinux(unittest.TestCase):
79+
@classmethod
80+
def setUpClass(cls):
81+
try:
82+
p = subprocess.run(['ld', '--version'],
83+
stdout=subprocess.PIPE,
84+
stderr=subprocess.DEVNULL,
85+
text=True)
86+
except OSError:
87+
pass
88+
else:
89+
if p.stdout.startswith('mold '):
90+
# The mold linker is known to be incompatible with
91+
# ctypes.util.find_library. The function is
92+
# documented as "Try to find a library..."
93+
# and formally soft-deprecated in 3.15+. We
94+
# we skip the test rather than try to fix it
95+
# (which would risk breaking other unsupported
96+
# platforms).
97+
raise unittest.SkipTest('Fails when ld is mold')
98+
7899
def test_find_on_libpath(self):
79-
import subprocess
80100
import tempfile
81101

82102
try:

0 commit comments

Comments
0 (0)
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.