|
9 | 9 | from weakref import proxy |
10 | 10 | from functools import wraps |
11 | 11 |
|
12 | | -from test.support import cpython_only, swap_attr, gc_collect |
| 12 | +from test.support import ( |
| 13 | + cpython_only, swap_attr, gc_collect, is_emscripten, is_wasi |
| 14 | +) |
13 | 15 | from test.support.os_helper import (TESTFN, TESTFN_UNICODE, make_bad_fd) |
14 | 16 | from test.support.warnings_helper import check_warnings |
15 | 17 | from collections import UserList |
@@ -65,6 +67,7 @@ def testAttributes(self): |
65 | 67 | self.assertRaises((AttributeError, TypeError), |
66 | 68 | setattr, f, attr, 'oops') |
67 | 69 |
|
| 70 | + @unittest.skipIf(is_wasi, "WASI does not expose st_blksize.") |
68 | 71 | def testBlksize(self): |
69 | 72 | # test private _blksize attribute |
70 | 73 | blksize = io.DEFAULT_BUFFER_SIZE |
@@ -415,7 +418,7 @@ def testAbles(self): |
415 | 418 | self.assertEqual(f.isatty(), False) |
416 | 419 | f.close() |
417 | 420 |
|
418 | | - if sys.platform != "win32": |
| 421 | + if sys.platform != "win32" and not is_emscripten: |
419 | 422 | try: |
420 | 423 | f = self.FileIO("/dev/tty", "a") |
421 | 424 | except OSError: |
|
0 commit comments