]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-127146: Update test skips for Emscripten 4.0.1 (#129375)
authorHood Chatham <roberthoodchatham@gmail.com>
Tue, 28 Jan 2025 01:05:21 +0000 (01:05 +0000)
committerGitHub <noreply@github.com>
Tue, 28 Jan 2025 01:05:21 +0000 (01:05 +0000)
Updates the Emscripten test skips to reflect recent changes in Emscripten capabilities.

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

index 6d2593cb4cf2288dd445529abe4cb095c35c0968..391158b855624d15a1fec09274e1b0d698e41226 100644 (file)
@@ -161,7 +161,7 @@ class GenericTest:
         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:
index 8c79d2c24a140afdb551e506fa8d2a446a6effef..e59d3977df413451f1d0c5e33eba1d3d80bdee79 100644 (file)
@@ -3928,7 +3928,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")
+    @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()
index 6715071af8c7522a1576c92164a4ba38d8eff487..da01c65a1c2954a9775de78be41f5ae90880516d 100644 (file)
@@ -940,7 +940,7 @@ class TestNtpath(NtpathTestCase):
         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
index d1bdf784b0df162bea342f8632836295f67bab32..72208d1c582568c3f134cff9f23f93d3cd831438 100644 (file)
@@ -5093,7 +5093,6 @@ 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 2d79d2ffede4613d03dba57d4753da51d8a3b04b..1f18b1f09b58581d7c86efeba3bac9944e7b9502 100644 (file)
@@ -1587,7 +1587,6 @@ 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 704a0090bdbc0fac2bcebd6c5306666650e317ab..96ae79b0eb18b3fc9eaa8ccf91dbe779b3705fb1 100644 (file)
@@ -253,9 +253,7 @@ class WakeupFDTests(unittest.TestCase):
         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()
@@ -274,7 +272,7 @@ class WakeupFDTests(unittest.TestCase):
         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()
@@ -295,7 +293,7 @@ class WakeupFDTests(unittest.TestCase):
     # 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()
index 2549b6b35adc292dde806bf9dde9ea79e0e9a985..54d329a15d4d259acb91a1b83f24a668fc6631ed 100644 (file)
@@ -3800,7 +3800,6 @@ 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 76b1de0e3519f98bf1fd74a729da08a6a64282de..6b1fe56074d56175666c69e8ffb535fc56482155 100644 (file)
@@ -624,7 +624,6 @@ 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 65f8b17f2f88c0b429ab43404dd34fead44b4c79..1f288c8b45d589985b01914069930b5b62e1e170 100644 (file)
@@ -1038,7 +1038,6 @@ 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)