Skip to content

gh-127146: Update test skips for Emscripten 4.0.1 #129375

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jan 28, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Lib/test/test_genericpath.py
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ def test_exists(self):
self.assertIs(self.pathmodule.lexists(path=filename), True)

@unittest.skipUnless(hasattr(os, "pipe"), "requires os.pipe()")
@unittest.skipIf(is_emscripten, "Emscripten pipe fds have no stat")
@unittest.skipIf(is_emscripten, "Fixed in next Emscripten release after 4.0.1")
def test_exists_fd(self):
r, w = os.pipe()
try:
Expand Down
2 changes: 1 addition & 1 deletion Lib/test/test_io.py
Original file line number Diff line number Diff line change
Expand Up @@ -3928,7 +3928,7 @@ def test_issue35928(self):
self.assertEqual(res + f.readline(), 'foo\nbar\n')

@unittest.skipUnless(hasattr(os, "pipe"), "requires os.pipe()")
@unittest.skipIf(support.is_emscripten, "Would be fixed by emscripten-core/emscripten#23306")
@unittest.skipIf(support.is_emscripten, "Fixed in next Emscripten release after 4.0.1")
def test_read_non_blocking(self):
import os
r, w = os.pipe()
Expand Down
2 changes: 1 addition & 1 deletion Lib/test/test_ntpath.py
Original file line number Diff line number Diff line change
Expand Up @@ -940,7 +940,7 @@ def check_error(paths, expected):
self.assertRaises(TypeError, ntpath.commonpath, ['C:\\Foo', b'Foo\\Baz'])
self.assertRaises(TypeError, ntpath.commonpath, ['Foo', b'C:\\Foo\\Baz'])

@unittest.skipIf(is_emscripten, "Emscripten cannot fstat unnamed files.")
@unittest.skipIf(is_emscripten, "Fixed in next Emscripten release after 4.0.1")
def test_sameopenfile(self):
with TemporaryFile() as tf1, TemporaryFile() as tf2:
# Make sure the same file is really the same
Expand Down
1 change: 0 additions & 1 deletion Lib/test/test_os.py
Original file line number Diff line number Diff line change
Expand Up @@ -5093,7 +5093,6 @@ def test_unpickable(self):
self.assertRaises(TypeError, pickle.dumps, scandir_iter, filename)
scandir_iter.close()

@unittest.skipIf(support.is_emscripten, "Fixed by emscripten-core/emscripten#23139, remove when next Emscripten release comes out")
def check_entry(self, entry, name, is_dir, is_file, is_symlink):
self.assertIsInstance(entry, os.DirEntry)
self.assertEqual(entry.name, name)
Expand Down
1 change: 0 additions & 1 deletion Lib/test/test_shutil.py
Original file line number Diff line number Diff line change
Expand Up @@ -1587,7 +1587,6 @@ def test_copyfile_same_file(self):
# the path as a directory, but on AIX the trailing slash has no effect
# and is considered as a file.
@unittest.skipIf(AIX, 'Not valid on AIX, see gh-92670')
@unittest.skipIf(support.is_emscripten, 'Fixed by emscripten-core/emscripten#23218, remove when next Emscripten release comes out')
def test_copyfile_nonexistent_dir(self):
# Issue 43219
src_dir = self.mkdtemp()
Expand Down
8 changes: 3 additions & 5 deletions Lib/test/test_signal.py
Original file line number Diff line number Diff line change
Expand Up @@ -253,9 +253,7 @@ def test_invalid_socket(self):
self.assertRaises((ValueError, OSError),
signal.set_wakeup_fd, fd)

# Emscripten does not support fstat on pipes yet.
# https://github.com/emscripten-core/emscripten/issues/16414
@unittest.skipIf(support.is_emscripten, "Emscripten cannot fstat pipes.")
@unittest.skipIf(support.is_emscripten, "Fixed in next Emscripten release after 4.0.1")
@unittest.skipUnless(hasattr(os, "pipe"), "requires os.pipe()")
def test_set_wakeup_fd_result(self):
r1, w1 = os.pipe()
Expand All @@ -274,7 +272,7 @@ def test_set_wakeup_fd_result(self):
self.assertEqual(signal.set_wakeup_fd(-1), w2)
self.assertEqual(signal.set_wakeup_fd(-1), -1)

@unittest.skipIf(support.is_emscripten, "Emscripten cannot fstat pipes.")
@unittest.skipIf(support.is_emscripten, "Fixed in next Emscripten release after 4.0.1")
@unittest.skipUnless(support.has_socket_support, "needs working sockets.")
def test_set_wakeup_fd_socket_result(self):
sock1 = socket.socket()
Expand All @@ -295,7 +293,7 @@ def test_set_wakeup_fd_socket_result(self):
# On Windows, files are always blocking and Windows does not provide a
# function to test if a socket is in non-blocking mode.
@unittest.skipIf(sys.platform == "win32", "tests specific to POSIX")
@unittest.skipIf(support.is_emscripten, "Emscripten cannot fstat pipes.")
@unittest.skipIf(support.is_emscripten, "Fixed in next Emscripten release after 4.0.1")
@unittest.skipUnless(hasattr(os, "pipe"), "requires os.pipe()")
def test_set_wakeup_fd_blocking(self):
rfd, wfd = os.pipe()
Expand Down
1 change: 0 additions & 1 deletion Lib/test/test_tarfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -3800,7 +3800,6 @@ def test_absolute_hardlink(self):
"'parent' is a link to an absolute path")

@symlink_test
@unittest.skipIf(support.is_emscripten, "Fixed by emscripten-core/emscripten#23136, remove when next Emscripten release comes out")
def test_sly_relative0(self):
# Inspired by 'relative0' in jwilk/traversal-archives
with ArchiveMaker() as arc:
Expand Down
1 change: 0 additions & 1 deletion Lib/test/test_zipfile/test_core.py
Original file line number Diff line number Diff line change
Expand Up @@ -624,7 +624,6 @@ def test_write_to_readonly(self):
with self.assertRaises(ValueError):
zipfp.open(TESTFN, mode='w')

@unittest.skipIf(is_emscripten, "Fixed by emscripten-core/emscripten#23310")
def test_add_file_before_1980(self):
# Set atime and mtime to 1970-01-01
os.utime(TESTFN, (0, 0))
Expand Down
1 change: 0 additions & 1 deletion Lib/test/test_zipimport.py
Original file line number Diff line number Diff line change
Expand Up @@ -1038,7 +1038,6 @@ def testEmptyFile(self):
self.assertZipFailure(TESTMOD)

@unittest.skipIf(support.is_wasi, "mode 000 not supported.")
@unittest.skipIf(support.is_emscripten, "Fixed by emscripten-core/emscripten#23137, remove when next Emscripten release comes out")
def testFileUnreadable(self):
os_helper.unlink(TESTMOD)
fd = os.open(TESTMOD, os.O_CREAT, 000)
Expand Down
Loading