]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-127146: Skip Emscripten tests with pending fixes (#128549)
authorHood Chatham <roberthoodchatham@gmail.com>
Mon, 6 Jan 2025 22:25:29 +0000 (23:25 +0100)
committerGitHub <noreply@github.com>
Mon, 6 Jan 2025 22:25:29 +0000 (06:25 +0800)
Marks some additional tests as skipped on Emscripten. Many of these skips can be
reverted when the next Emscripten release is available.

Lib/test/test_io.py
Lib/test/test_os.py
Lib/test/test_shutil.py
Lib/test/test_tarfile.py
Lib/test/test_zipfile/test_core.py
Lib/test/test_zipimport.py

index 81c17b2731cc5897df09c6fb8ba2dc3bc1205fae..33e0161241e87eb2efe04d7f8f1a46255a350986 100644 (file)
@@ -3933,6 +3933,7 @@ class TextIOWrapperTest(unittest.TestCase):
         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()
index d688a225538c11c8d1b99246c7f600ea3339ce4e..d2c4dff3c9a0e58b6fc6306559c74bb640b2c352 100644 (file)
@@ -4979,6 +4979,7 @@ class TestScandir(unittest.TestCase):
         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)
index 1f18b1f09b58581d7c86efeba3bac9944e7b9502..2d79d2ffede4613d03dba57d4753da51d8a3b04b 100644 (file)
@@ -1587,6 +1587,7 @@ class TestCopy(BaseTest, unittest.TestCase):
     # 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()
index 54d329a15d4d259acb91a1b83f24a668fc6631ed..2549b6b35adc292dde806bf9dde9ea79e0e9a985 100644 (file)
@@ -3800,6 +3800,7 @@ class TestExtractionFilters(unittest.TestCase):
                 "'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:
index 49f39b9337df85db3ee7713f4699557dead0397b..79e7337606b4bc51371c5e53ac13c16944c5857d 100644 (file)
@@ -22,7 +22,8 @@ from test import archiver_tests
 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
@@ -622,6 +623,7 @@ class StoredTestsWithSourceFile(AbstractTestsWithSourceFile,
             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))
index 1f288c8b45d589985b01914069930b5b62e1e170..65f8b17f2f88c0b429ab43404dd34fead44b4c79 100644 (file)
@@ -1038,6 +1038,7 @@ class BadFileZipImportTestCase(unittest.TestCase):
         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)