Skip to content

Commit

Permalink
gh-127146: Skip Emscripten tests with pending fixes (#128549)
Browse files Browse the repository at this point in the history
Marks some additional tests as skipped on Emscripten. Many of these skips can be
reverted when the next Emscripten release is available.
  • Loading branch information
hoodmane authored Jan 6, 2025
1 parent 2434fd2 commit 616692d
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 1 deletion.
1 change: 1 addition & 0 deletions Lib/test/test_io.py
Original file line number Diff line number Diff line change
Expand Up @@ -3933,6 +3933,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")
def test_read_non_blocking(self):
import os
r, w = os.pipe()
Expand Down
1 change: 1 addition & 0 deletions Lib/test/test_os.py
Original file line number Diff line number Diff line change
Expand Up @@ -4979,6 +4979,7 @@ 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: 1 addition & 0 deletions Lib/test/test_shutil.py
Original file line number Diff line number Diff line change
Expand Up @@ -1587,6 +1587,7 @@ 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
1 change: 1 addition & 0 deletions Lib/test/test_tarfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -3800,6 +3800,7 @@ 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
4 changes: 3 additions & 1 deletion Lib/test/test_zipfile/test_core.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@
from test.support import script_helper
from test.support import (
findfile, requires_zlib, requires_bz2, requires_lzma,
captured_stdout, captured_stderr, requires_subprocess
captured_stdout, captured_stderr, requires_subprocess,
is_emscripten
)
from test.support.os_helper import (
TESTFN, unlink, rmtree, temp_dir, temp_cwd, fd_count, FakePath
Expand Down Expand Up @@ -622,6 +623,7 @@ 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: 1 addition & 0 deletions Lib/test/test_zipimport.py
Original file line number Diff line number Diff line change
Expand Up @@ -1038,6 +1038,7 @@ 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

0 comments on commit 616692d

Please sign in to comment.