diff options
Diffstat (limited to 'Lib/test/test_genericpath.py')
-rw-r--r-- | Lib/test/test_genericpath.py | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/Lib/test/test_genericpath.py b/Lib/test/test_genericpath.py index 1ff7f75ad3e..2741adc139b 100644 --- a/Lib/test/test_genericpath.py +++ b/Lib/test/test_genericpath.py @@ -7,6 +7,7 @@ import os import sys import unittest import warnings +from test.support import is_emscripten from test.support import os_helper from test.support import warnings_helper from test.support.script_helper import assert_python_ok @@ -154,6 +155,7 @@ class GenericTest: self.assertIs(self.pathmodule.lexists(bfilename + b'\x00'), False) @unittest.skipUnless(hasattr(os, "pipe"), "requires os.pipe()") + @unittest.skipIf(is_emscripten, "Emscripten pipe fds have no stat") def test_exists_fd(self): r, w = os.pipe() try: @@ -246,6 +248,7 @@ class GenericTest: def test_samefile_on_symlink(self): self._test_samefile_on_link_func(os.symlink) + @unittest.skipUnless(hasattr(os, 'link'), 'requires os.link') def test_samefile_on_link(self): try: self._test_samefile_on_link_func(os.link) @@ -288,6 +291,7 @@ class GenericTest: def test_samestat_on_symlink(self): self._test_samestat_on_link_func(os.symlink) + @unittest.skipUnless(hasattr(os, 'link'), 'requires os.link') def test_samestat_on_link(self): try: self._test_samestat_on_link_func(os.link) @@ -476,11 +480,11 @@ class CommonTest(GenericTest): def test_nonascii_abspath(self): if (os_helper.TESTFN_UNDECODABLE - # Mac OS X denies the creation of a directory with an invalid - # UTF-8 name. Windows allows creating a directory with an + # macOS and Emscripten deny the creation of a directory with an + # invalid UTF-8 name. Windows allows creating a directory with an # arbitrary bytes name, but fails to enter this directory # (when the bytes name is used). - and sys.platform not in ('win32', 'darwin')): + and sys.platform not in ('win32', 'darwin', 'emscripten')): name = os_helper.TESTFN_UNDECODABLE elif os_helper.TESTFN_NONASCII: name = os_helper.TESTFN_NONASCII |