Skip to content

Commit 95ba723

Browse files
authored
bpo-40280: Skip dysfunctional pipe tests on Emscripten (GH-31770)
1 parent 88b7d86 commit 95ba723

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

Lib/test/test_io.py

+12
Original file line numberDiff line numberDiff line change
@@ -426,6 +426,9 @@ def test_invalid_operations(self):
426426
self.assertRaises(exc, fp.seek, 1, self.SEEK_CUR)
427427
self.assertRaises(exc, fp.seek, -1, self.SEEK_END)
428428

429+
@unittest.skipIf(
430+
support.is_emscripten, "fstat() of a pipe fd is not supported"
431+
)
429432
def test_optional_abilities(self):
430433
# Test for OSError when optional APIs are not supported
431434
# The purpose of this test is to try fileno(), reading, writing and
@@ -3971,6 +3974,9 @@ def test_removed_u_mode(self):
39713974
self.open(os_helper.TESTFN, mode)
39723975
self.assertIn('invalid mode', str(cm.exception))
39733976

3977+
@unittest.skipIf(
3978+
support.is_emscripten, "fstat() of a pipe fd is not supported"
3979+
)
39743980
def test_open_pipe_with_append(self):
39753981
# bpo-27805: Ignore ESPIPE from lseek() in open().
39763982
r, w = os.pipe()
@@ -4134,9 +4140,15 @@ def test_pickling(self):
41344140
with self.open(os_helper.TESTFN, **kwargs) as f:
41354141
self.assertRaises(TypeError, pickle.dumps, f, protocol)
41364142

4143+
@unittest.skipIf(
4144+
support.is_emscripten, "fstat() of a pipe fd is not supported"
4145+
)
41374146
def test_nonblock_pipe_write_bigbuf(self):
41384147
self._test_nonblock_pipe_write(16*1024)
41394148

4149+
@unittest.skipIf(
4150+
support.is_emscripten, "fstat() of a pipe fd is not supported"
4151+
)
41404152
def test_nonblock_pipe_write_smallbuf(self):
41414153
self._test_nonblock_pipe_write(1024)
41424154

0 commit comments

Comments
 (0)