From: Hood Chatham Date: Wed, 18 Jun 2025 03:19:23 +0000 (-0700) Subject: gh-127146: Emscripten: Fix test failure due to missing os.link (#135626) X-Git-Tag: v3.15.0a1~1270 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=ce58afb400672aeec79f2017ab99acbbc65cb4ab;p=thirdparty%2FPython%2Fcpython.git gh-127146: Emscripten: Fix test failure due to missing os.link (#135626) Check for existence of os.link, rather than assuming it exists. --- diff --git a/Lib/test/test_inspect/test_inspect.py b/Lib/test/test_inspect/test_inspect.py index e584fb417b9d..79eb103224b9 100644 --- a/Lib/test/test_inspect/test_inspect.py +++ b/Lib/test/test_inspect/test_inspect.py @@ -5875,9 +5875,9 @@ class TestSignatureDefinitions(unittest.TestCase): self._test_module_has_signatures(operator) def test_os_module_has_signatures(self): - unsupported_signature = {'chmod', 'link', 'utime'} + unsupported_signature = {'chmod', 'utime'} unsupported_signature |= {name for name in - ['get_terminal_size', 'posix_spawn', 'posix_spawnp', + ['get_terminal_size', 'link', 'posix_spawn', 'posix_spawnp', 'register_at_fork', 'startfile'] if hasattr(os, name)} self._test_module_has_signatures(os, unsupported_signature=unsupported_signature)