diff options
| author | Christian Heimes <christian@python.org> | 2022-05-16 07:37:30 (GMT) |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-05-16 07:37:30 (GMT) |
| commit | 730902c0ad997462d2567e48def5352fe75c0e2c (patch) | |
| tree | a83ccc77e4c006b1b4f8a061d5102cf62d72dcf3 /Lib/test/test_io.py | |
| parent | 3ed1cae9ed9d1f0dd9d68da4b30b731fdf6be768 (diff) | |
| download | cpython-730902c0ad997462d2567e48def5352fe75c0e2c.zip cpython-730902c0ad997462d2567e48def5352fe75c0e2c.tar.gz cpython-730902c0ad997462d2567e48def5352fe75c0e2c.tar.bz2 | |
gh-90473: WASI: Mark tests that require os.pipe() (GH-92837)
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") |
