@@ -1334,7 +1334,9 @@ def setUp(self):
13341334 else :
13351335 self .sub2_tree = (sub2_path , ["SUB21" ], ["tmp3" ])
13361336
1337- os .chmod (sub21_path , 0 )
1337+ if not support .is_emscripten :
1338+ # Emscripten fails with inaccessible directory
1339+ os .chmod (sub21_path , 0 )
13381340 try :
13391341 os .listdir (sub21_path )
13401342 except PermissionError :
@@ -1517,6 +1519,9 @@ def test_yields_correct_dir_fd(self):
15171519 # check that listdir() returns consistent information
15181520 self .assertEqual (set (os .listdir (rootfd )), set (dirs ) | set (files ))
15191521
1522+ @unittest .skipIf (
1523+ support .is_emscripten , "Cannot dup stdout on Emscripten"
1524+ )
15201525 def test_fd_leak (self ):
15211526 # Since we're opening a lot of FDs, we must be careful to avoid leaks:
15221527 # we both check that calling fwalk() a large number of times doesn't
@@ -2935,6 +2940,9 @@ def test_bad_fd(self):
29352940 @unittest .skipUnless (os .isatty (0 ) and not win32_is_iot () and (sys .platform .startswith ('win' ) or
29362941 (hasattr (locale , 'nl_langinfo' ) and hasattr (locale , 'CODESET' ))),
29372942 '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+ )
29382946 def test_device_encoding (self ):
29392947 encoding = os .device_encoding (0 )
29402948 self .assertIsNotNone (encoding )
0 commit comments