mirror of https://github.com/python/cpython
bpo-40280: Skip wakeup_fd pipe tests on Emscripten (GH-31909)
This commit is contained in:
parent
ea786a882b
commit
b43b9b49be
|
@ -205,6 +205,9 @@ class WakeupFDTests(unittest.TestCase):
|
||||||
self.assertRaises((ValueError, OSError),
|
self.assertRaises((ValueError, OSError),
|
||||||
signal.set_wakeup_fd, fd)
|
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.")
|
||||||
def test_set_wakeup_fd_result(self):
|
def test_set_wakeup_fd_result(self):
|
||||||
r1, w1 = os.pipe()
|
r1, w1 = os.pipe()
|
||||||
self.addCleanup(os.close, r1)
|
self.addCleanup(os.close, r1)
|
||||||
|
@ -222,6 +225,7 @@ class WakeupFDTests(unittest.TestCase):
|
||||||
self.assertEqual(signal.set_wakeup_fd(-1), w2)
|
self.assertEqual(signal.set_wakeup_fd(-1), w2)
|
||||||
self.assertEqual(signal.set_wakeup_fd(-1), -1)
|
self.assertEqual(signal.set_wakeup_fd(-1), -1)
|
||||||
|
|
||||||
|
@unittest.skipIf(support.is_emscripten, "Emscripten cannot fstat pipes.")
|
||||||
def test_set_wakeup_fd_socket_result(self):
|
def test_set_wakeup_fd_socket_result(self):
|
||||||
sock1 = socket.socket()
|
sock1 = socket.socket()
|
||||||
self.addCleanup(sock1.close)
|
self.addCleanup(sock1.close)
|
||||||
|
@ -241,6 +245,7 @@ class WakeupFDTests(unittest.TestCase):
|
||||||
# On Windows, files are always blocking and Windows does not provide a
|
# On Windows, files are always blocking and Windows does not provide a
|
||||||
# function to test if a socket is in non-blocking mode.
|
# function to test if a socket is in non-blocking mode.
|
||||||
@unittest.skipIf(sys.platform == "win32", "tests specific to POSIX")
|
@unittest.skipIf(sys.platform == "win32", "tests specific to POSIX")
|
||||||
|
@unittest.skipIf(support.is_emscripten, "Emscripten cannot fstat pipes.")
|
||||||
def test_set_wakeup_fd_blocking(self):
|
def test_set_wakeup_fd_blocking(self):
|
||||||
rfd, wfd = os.pipe()
|
rfd, wfd = os.pipe()
|
||||||
self.addCleanup(os.close, rfd)
|
self.addCleanup(os.close, rfd)
|
||||||
|
|
Loading…
Reference in New Issue