Skip to content

Commit 23a4e3b

Browse files
hoodmanevstinner
andauthored
gh-145335: Skip Emscripten for os.execve() test (#145528)
Emscripten's os.execve() always fails with ENOEXEC. Co-authored-by: Victor Stinner <vstinner@python.org>
1 parent 0eaf260 commit 23a4e3b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Lib/test/test_os/test_os.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2824,7 +2824,8 @@ def test_negative_fd_ebadf(self, fd):
28242824
func(*args)
28252825
self.assertEqual(ctx.exception.errno, errno.EBADF)
28262826

2827-
if hasattr(os, "execve") and os.execve in os.supports_fd:
2827+
if (hasattr(os, "execve") and os.execve in os.supports_fd
2828+
and support.has_subprocess_support):
28282829
# glibc fails with EINVAL, musl fails with EBADF
28292830
with self.assertRaises(OSError) as ctx:
28302831
os.execve(fd, [sys.executable, "-c", "pass"], os.environ)

0 commit comments

Comments
 (0)