mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
gh-90473: WASI: Mark tests that require os.pipe() (GH-92837)
(cherry picked from commit 730902c0ad
)
Co-authored-by: Christian Heimes <christian@python.org>
This commit is contained in:
parent
fdfc7eb410
commit
5f24acdca0
4 changed files with 14 additions and 0 deletions
|
@ -222,6 +222,7 @@ class WakeupFDTests(unittest.TestCase):
|
|||
# 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.skipUnless(hasattr(os, "pipe"), "requires os.pipe()")
|
||||
def test_set_wakeup_fd_result(self):
|
||||
r1, w1 = os.pipe()
|
||||
self.addCleanup(os.close, r1)
|
||||
|
@ -260,6 +261,7 @@ class WakeupFDTests(unittest.TestCase):
|
|||
# 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.skipUnless(hasattr(os, "pipe"), "requires os.pipe()")
|
||||
def test_set_wakeup_fd_blocking(self):
|
||||
rfd, wfd = os.pipe()
|
||||
self.addCleanup(os.close, rfd)
|
||||
|
@ -320,6 +322,7 @@ class WakeupSignalTests(unittest.TestCase):
|
|||
assert_python_ok('-c', code)
|
||||
|
||||
@unittest.skipIf(_testcapi is None, 'need _testcapi')
|
||||
@unittest.skipUnless(hasattr(os, "pipe"), "requires os.pipe()")
|
||||
def test_wakeup_write_error(self):
|
||||
# Issue #16105: write() errors in the C signal handler should not
|
||||
# pass silently.
|
||||
|
@ -659,6 +662,7 @@ class WakeupSocketSignalTests(unittest.TestCase):
|
|||
@unittest.skipIf(sys.platform == "win32", "Not valid on Windows")
|
||||
@unittest.skipUnless(hasattr(signal, 'siginterrupt'), "needs signal.siginterrupt()")
|
||||
@support.requires_subprocess()
|
||||
@unittest.skipUnless(hasattr(os, "pipe"), "requires os.pipe()")
|
||||
class SiginterruptTest(unittest.TestCase):
|
||||
|
||||
def readpipe_interrupted(self, interrupt):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue