@@ -1334,7 +1334,9 @@ def setUp(self):
1334
1334
else :
1335
1335
self .sub2_tree = (sub2_path , ["SUB21" ], ["tmp3" ])
1336
1336
1337
- os .chmod (sub21_path , 0 )
1337
+ if not support .is_emscripten :
1338
+ # Emscripten fails with inaccessible directory
1339
+ os .chmod (sub21_path , 0 )
1338
1340
try :
1339
1341
os .listdir (sub21_path )
1340
1342
except PermissionError :
@@ -1517,6 +1519,9 @@ def test_yields_correct_dir_fd(self):
1517
1519
# check that listdir() returns consistent information
1518
1520
self .assertEqual (set (os .listdir (rootfd )), set (dirs ) | set (files ))
1519
1521
1522
+ @unittest .skipIf (
1523
+ support .is_emscripten , "Cannot dup stdout on Emscripten"
1524
+ )
1520
1525
def test_fd_leak (self ):
1521
1526
# Since we're opening a lot of FDs, we must be careful to avoid leaks:
1522
1527
# we both check that calling fwalk() a large number of times doesn't
@@ -2935,6 +2940,9 @@ def test_bad_fd(self):
2935
2940
@unittest .skipUnless (os .isatty (0 ) and not win32_is_iot () and (sys .platform .startswith ('win' ) or
2936
2941
(hasattr (locale , 'nl_langinfo' ) and hasattr (locale , 'CODESET' ))),
2937
2942
'test requires a tty and either Windows or nl_langinfo(CODESET)' )
2943
+ @unittest .skipIf (
2944
+ support .is_emscripten , "Cannot get encoding of stdin on Emscripten"
2945
+ )
2938
2946
def test_device_encoding (self ):
2939
2947
encoding = os .device_encoding (0 )
2940
2948
self .assertIsNotNone (encoding )
0 commit comments