diff options
Diffstat (limited to 'Lib/test/test_io.py')
-rw-r--r-- | Lib/test/test_io.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/Lib/test/test_io.py b/Lib/test/test_io.py index 5528c46..039da53 100644 --- a/Lib/test/test_io.py +++ b/Lib/test/test_io.py @@ -429,6 +429,7 @@ class IOTest(unittest.TestCase): @unittest.skipIf( support.is_emscripten, "fstat() of a pipe fd is not supported" ) + @unittest.skipUnless(hasattr(os, "pipe"), "requires os.pipe()") def test_optional_abilities(self): # Test for OSError when optional APIs are not supported # The purpose of this test is to try fileno(), reading, writing and @@ -3970,6 +3971,7 @@ class MiscIOTest(unittest.TestCase): @unittest.skipIf( support.is_emscripten, "fstat() of a pipe fd is not supported" ) + @unittest.skipUnless(hasattr(os, "pipe"), "requires os.pipe()") def test_open_pipe_with_append(self): # bpo-27805: Ignore ESPIPE from lseek() in open(). r, w = os.pipe() @@ -4108,6 +4110,7 @@ class MiscIOTest(unittest.TestCase): with warnings_helper.check_no_resource_warning(self): open(r, *args, closefd=False, **kwargs) + @unittest.skipUnless(hasattr(os, "pipe"), "requires os.pipe()") def test_warn_on_dealloc_fd(self): self._check_warn_on_dealloc_fd("rb", buffering=0) self._check_warn_on_dealloc_fd("rb") @@ -4147,6 +4150,7 @@ class MiscIOTest(unittest.TestCase): @unittest.skipUnless(hasattr(os, 'set_blocking'), 'os.set_blocking() required for this test') + @unittest.skipUnless(hasattr(os, "pipe"), "requires os.pipe()") def _test_nonblock_pipe_write(self, bufsize): sent = [] received = [] @@ -4458,14 +4462,17 @@ class SignalsTest(unittest.TestCase): raise @requires_alarm + @unittest.skipUnless(hasattr(os, "pipe"), "requires os.pipe()") def test_interrupted_write_unbuffered(self): self.check_interrupted_write(b"xy", b"xy", mode="wb", buffering=0) @requires_alarm + @unittest.skipUnless(hasattr(os, "pipe"), "requires os.pipe()") def test_interrupted_write_buffered(self): self.check_interrupted_write(b"xy", b"xy", mode="wb") @requires_alarm + @unittest.skipUnless(hasattr(os, "pipe"), "requires os.pipe()") def test_interrupted_write_text(self): self.check_interrupted_write("xy", b"xy", mode="w", encoding="ascii") |