Skip to content

Commit 2ef8113

Browse files
committed
gh-127146: Update test skips for Emscripten 4.0.2
1 parent 652f66a commit 2ef8113

File tree

5 files changed

+6
-20
lines changed

5 files changed

+6
-20
lines changed

Lib/test/test_genericpath.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,6 @@ def test_exists(self):
161161
self.assertIs(self.pathmodule.lexists(path=filename), True)
162162

163163
@unittest.skipUnless(hasattr(os, "pipe"), "requires os.pipe()")
164-
@unittest.skipIf(is_emscripten, "Fixed in next Emscripten release after 4.0.1")
165164
def test_exists_fd(self):
166165
r, w = os.pipe()
167166
try:

Lib/test/test_io.py

Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -445,9 +445,6 @@ def test_invalid_operations(self):
445445
self.assertRaises(exc, fp.seek, 1, self.SEEK_CUR)
446446
self.assertRaises(exc, fp.seek, -1, self.SEEK_END)
447447

448-
@unittest.skipIf(
449-
support.is_emscripten, "fstat() of a pipe fd is not supported"
450-
)
451448
@unittest.skipUnless(hasattr(os, "pipe"), "requires os.pipe()")
452449
def test_optional_abilities(self):
453450
# Test for OSError when optional APIs are not supported
@@ -502,6 +499,8 @@ class UnseekableWriter(self.MockUnseekableIO):
502499
(self.BytesIO, "rws"), (self.StringIO, "rws"),
503500
)
504501
for [test, abilities] in tests:
502+
if test == pipe_writer and not threading_helper.can_start_thread:
503+
continue
505504
with self.subTest(test), test() as obj:
506505
readable = "r" in abilities
507506
self.assertEqual(obj.readable(), readable)
@@ -3928,7 +3927,6 @@ def test_issue35928(self):
39283927
self.assertEqual(res + f.readline(), 'foo\nbar\n')
39293928

39303929
@unittest.skipUnless(hasattr(os, "pipe"), "requires os.pipe()")
3931-
@unittest.skipIf(support.is_emscripten, "Fixed in next Emscripten release after 4.0.1")
39323930
def test_read_non_blocking(self):
39333931
import os
39343932
r, w = os.pipe()
@@ -4243,9 +4241,6 @@ def test_removed_u_mode(self):
42434241
self.open(os_helper.TESTFN, mode)
42444242
self.assertIn('invalid mode', str(cm.exception))
42454243

4246-
@unittest.skipIf(
4247-
support.is_emscripten, "fstat() of a pipe fd is not supported"
4248-
)
42494244
@unittest.skipUnless(hasattr(os, "pipe"), "requires os.pipe()")
42504245
def test_open_pipe_with_append(self):
42514246
# bpo-27805: Ignore ESPIPE from lseek() in open().
@@ -4414,15 +4409,11 @@ def test_pickling(self):
44144409
with self.assertRaisesRegex(TypeError, msg):
44154410
pickle.dumps(f, protocol)
44164411

4417-
@unittest.skipIf(
4418-
support.is_emscripten, "fstat() of a pipe fd is not supported"
4419-
)
4412+
@unittest.skipIf(support.is_emscripten, "Corrupts memory")
44204413
def test_nonblock_pipe_write_bigbuf(self):
44214414
self._test_nonblock_pipe_write(16*1024)
44224415

4423-
@unittest.skipIf(
4424-
support.is_emscripten, "fstat() of a pipe fd is not supported"
4425-
)
4416+
@unittest.skipIf(support.is_emscripten, "Corrupts memory")
44264417
def test_nonblock_pipe_write_smallbuf(self):
44274418
self._test_nonblock_pipe_write(1024)
44284419

Lib/test/test_ntpath.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -940,7 +940,6 @@ def check_error(paths, expected):
940940
self.assertRaises(TypeError, ntpath.commonpath, ['C:\\Foo', b'Foo\\Baz'])
941941
self.assertRaises(TypeError, ntpath.commonpath, ['Foo', b'C:\\Foo\\Baz'])
942942

943-
@unittest.skipIf(is_emscripten, "Fixed in next Emscripten release after 4.0.1")
944943
def test_sameopenfile(self):
945944
with TemporaryFile() as tf1, TemporaryFile() as tf2:
946945
# Make sure the same file is really the same

Lib/test/test_signal.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,6 @@ def test_invalid_socket(self):
253253
self.assertRaises((ValueError, OSError),
254254
signal.set_wakeup_fd, fd)
255255

256-
@unittest.skipIf(support.is_emscripten, "Fixed in next Emscripten release after 4.0.1")
257256
@unittest.skipUnless(hasattr(os, "pipe"), "requires os.pipe()")
258257
def test_set_wakeup_fd_result(self):
259258
r1, w1 = os.pipe()
@@ -272,7 +271,6 @@ def test_set_wakeup_fd_result(self):
272271
self.assertEqual(signal.set_wakeup_fd(-1), w2)
273272
self.assertEqual(signal.set_wakeup_fd(-1), -1)
274273

275-
@unittest.skipIf(support.is_emscripten, "Fixed in next Emscripten release after 4.0.1")
276274
@unittest.skipUnless(support.has_socket_support, "needs working sockets.")
277275
def test_set_wakeup_fd_socket_result(self):
278276
sock1 = socket.socket()
@@ -293,7 +291,6 @@ def test_set_wakeup_fd_socket_result(self):
293291
# On Windows, files are always blocking and Windows does not provide a
294292
# function to test if a socket is in non-blocking mode.
295293
@unittest.skipIf(sys.platform == "win32", "tests specific to POSIX")
296-
@unittest.skipIf(support.is_emscripten, "Fixed in next Emscripten release after 4.0.1")
297294
@unittest.skipUnless(hasattr(os, "pipe"), "requires os.pipe()")
298295
def test_set_wakeup_fd_blocking(self):
299296
rfd, wfd = os.pipe()

Tools/wasm/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ https://github.com/psf/webassembly for more information.
2424
To cross compile to the ``wasm32-emscripten`` platform you need
2525
[the Emscripten compiler toolchain](https://emscripten.org/),
2626
a Python interpreter, and an installation of Node version 18 or newer.
27-
Emscripten version 3.1.73 or newer is recommended. All commands below are
27+
Emscripten version 4.0.2 or newer is recommended. All commands below are
2828
relative to a checkout of the Python repository.
2929

3030
#### Install [the Emscripten compiler toolchain](https://emscripten.org/docs/getting_started/downloads.html)
@@ -266,7 +266,7 @@ if os.name == "posix":
266266
posix.uname_result(
267267
sysname='Emscripten',
268268
nodename='emscripten',
269-
release='3.1.19',
269+
release='4.0.2',
270270
version='#1',
271271
machine='wasm32'
272272
)

0 commit comments

Comments
 (0)