Skip to content

Commit 616692d

Browse files
authored
gh-127146: Skip Emscripten tests with pending fixes (#128549)
Marks some additional tests as skipped on Emscripten. Many of these skips can be reverted when the next Emscripten release is available.
1 parent 2434fd2 commit 616692d

File tree

6 files changed

+8
-1
lines changed

6 files changed

+8
-1
lines changed

Lib/test/test_io.py

+1
Original file line numberDiff line numberDiff line change
@@ -3933,6 +3933,7 @@ def test_issue35928(self):
39333933
self.assertEqual(res + f.readline(), 'foo\nbar\n')
39343934

39353935
@unittest.skipUnless(hasattr(os, "pipe"), "requires os.pipe()")
3936+
@unittest.skipIf(support.is_emscripten, "Would be fixed by emscripten-core/emscripten#23306")
39363937
def test_read_non_blocking(self):
39373938
import os
39383939
r, w = os.pipe()

Lib/test/test_os.py

+1
Original file line numberDiff line numberDiff line change
@@ -4979,6 +4979,7 @@ def test_unpickable(self):
49794979
self.assertRaises(TypeError, pickle.dumps, scandir_iter, filename)
49804980
scandir_iter.close()
49814981

4982+
@unittest.skipIf(support.is_emscripten, "Fixed by emscripten-core/emscripten#23139, remove when next Emscripten release comes out")
49824983
def check_entry(self, entry, name, is_dir, is_file, is_symlink):
49834984
self.assertIsInstance(entry, os.DirEntry)
49844985
self.assertEqual(entry.name, name)

Lib/test/test_shutil.py

+1
Original file line numberDiff line numberDiff line change
@@ -1587,6 +1587,7 @@ def test_copyfile_same_file(self):
15871587
# the path as a directory, but on AIX the trailing slash has no effect
15881588
# and is considered as a file.
15891589
@unittest.skipIf(AIX, 'Not valid on AIX, see gh-92670')
1590+
@unittest.skipIf(support.is_emscripten, 'Fixed by emscripten-core/emscripten#23218, remove when next Emscripten release comes out')
15901591
def test_copyfile_nonexistent_dir(self):
15911592
# Issue 43219
15921593
src_dir = self.mkdtemp()

Lib/test/test_tarfile.py

+1
Original file line numberDiff line numberDiff line change
@@ -3800,6 +3800,7 @@ def test_absolute_hardlink(self):
38003800
"'parent' is a link to an absolute path")
38013801

38023802
@symlink_test
3803+
@unittest.skipIf(support.is_emscripten, "Fixed by emscripten-core/emscripten#23136, remove when next Emscripten release comes out")
38033804
def test_sly_relative0(self):
38043805
# Inspired by 'relative0' in jwilk/traversal-archives
38053806
with ArchiveMaker() as arc:

Lib/test/test_zipfile/test_core.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,8 @@
2222
from test.support import script_helper
2323
from test.support import (
2424
findfile, requires_zlib, requires_bz2, requires_lzma,
25-
captured_stdout, captured_stderr, requires_subprocess
25+
captured_stdout, captured_stderr, requires_subprocess,
26+
is_emscripten
2627
)
2728
from test.support.os_helper import (
2829
TESTFN, unlink, rmtree, temp_dir, temp_cwd, fd_count, FakePath
@@ -622,6 +623,7 @@ def test_write_to_readonly(self):
622623
with self.assertRaises(ValueError):
623624
zipfp.open(TESTFN, mode='w')
624625

626+
@unittest.skipIf(is_emscripten, "Fixed by emscripten-core/emscripten#23310")
625627
def test_add_file_before_1980(self):
626628
# Set atime and mtime to 1970-01-01
627629
os.utime(TESTFN, (0, 0))

Lib/test/test_zipimport.py

+1
Original file line numberDiff line numberDiff line change
@@ -1038,6 +1038,7 @@ def testEmptyFile(self):
10381038
self.assertZipFailure(TESTMOD)
10391039

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

0 commit comments

Comments
 (0)