From: Hood Chatham Date: Thu, 5 Mar 2026 11:29:34 +0000 (+0100) Subject: gh-145335: Skip Emscripten for os.execve() test (#145528) X-Git-Tag: v3.15.0a7~60 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=23a4e3ba3c44b423eff635672c56d614f5ea3899;p=thirdparty%2FPython%2Fcpython.git gh-145335: Skip Emscripten for os.execve() test (#145528) Emscripten's os.execve() always fails with ENOEXEC. Co-authored-by: Victor Stinner --- diff --git a/Lib/test/test_os/test_os.py b/Lib/test/test_os/test_os.py index 3cab8ff9536d..06f69caad12b 100644 --- a/Lib/test/test_os/test_os.py +++ b/Lib/test/test_os/test_os.py @@ -2824,7 +2824,8 @@ class TestInvalidFD(unittest.TestCase): func(*args) self.assertEqual(ctx.exception.errno, errno.EBADF) - if hasattr(os, "execve") and os.execve in os.supports_fd: + if (hasattr(os, "execve") and os.execve in os.supports_fd + and support.has_subprocess_support): # glibc fails with EINVAL, musl fails with EBADF with self.assertRaises(OSError) as ctx: os.execve(fd, [sys.executable, "-c", "pass"], os.environ)