@@ -188,9 +188,6 @@ def test_access(self):
188
188
os .close (f )
189
189
self .assertTrue (os .access (os_helper .TESTFN , os .W_OK ))
190
190
191
- @unittest .skipIf (
192
- support .is_emscripten , "Test is unstable under Emscripten."
193
- )
194
191
@unittest .skipIf (
195
192
support .is_wasi , "WASI does not support dup."
196
193
)
@@ -1428,9 +1425,7 @@ def setUp(self):
1428
1425
else :
1429
1426
self .sub2_tree = (sub2_path , ["SUB21" ], ["tmp3" ])
1430
1427
1431
- if not support .is_emscripten :
1432
- # Emscripten fails with inaccessible directory
1433
- os .chmod (sub21_path , 0 )
1428
+ os .chmod (sub21_path , 0 )
1434
1429
try :
1435
1430
os .listdir (sub21_path )
1436
1431
except PermissionError :
@@ -1726,9 +1721,6 @@ def test_yields_correct_dir_fd(self):
1726
1721
# check that listdir() returns consistent information
1727
1722
self .assertEqual (set (os .listdir (rootfd )), set (dirs ) | set (files ))
1728
1723
1729
- @unittest .skipIf (
1730
- support .is_emscripten , "Cannot dup stdout on Emscripten"
1731
- )
1732
1724
@unittest .skipIf (
1733
1725
support .is_android , "dup return value is unpredictable on Android"
1734
1726
)
@@ -1745,9 +1737,6 @@ def test_fd_leak(self):
1745
1737
self .addCleanup (os .close , newfd )
1746
1738
self .assertEqual (newfd , minfd )
1747
1739
1748
- @unittest .skipIf (
1749
- support .is_emscripten , "Cannot dup stdout on Emscripten"
1750
- )
1751
1740
@unittest .skipIf (
1752
1741
support .is_android , "dup return value is unpredictable on Android"
1753
1742
)
@@ -1816,8 +1805,8 @@ def test_makedir(self):
1816
1805
os .makedirs (path )
1817
1806
1818
1807
@unittest .skipIf (
1819
- support .is_emscripten or support . is_wasi ,
1820
- "Emscripten's/ WASI's umask is a stub."
1808
+ support .is_wasi ,
1809
+ "WASI's umask is a stub."
1821
1810
)
1822
1811
def test_mode (self ):
1823
1812
with os_helper .temp_umask (0o002 ):
@@ -1832,8 +1821,8 @@ def test_mode(self):
1832
1821
self .assertEqual (os .stat (parent ).st_mode & 0o777 , 0o775 )
1833
1822
1834
1823
@unittest .skipIf (
1835
- support .is_emscripten or support . is_wasi ,
1836
- "Emscripten's/ WASI's umask is a stub."
1824
+ support .is_wasi ,
1825
+ "WASI's umask is a stub."
1837
1826
)
1838
1827
def test_exist_ok_existing_directory (self ):
1839
1828
path = os .path .join (os_helper .TESTFN , 'dir1' )
@@ -1850,8 +1839,8 @@ def test_exist_ok_existing_directory(self):
1850
1839
os .makedirs (os .path .abspath ('/' ), exist_ok = True )
1851
1840
1852
1841
@unittest .skipIf (
1853
- support .is_emscripten or support . is_wasi ,
1854
- "Emscripten's/ WASI's umask is a stub."
1842
+ support .is_wasi ,
1843
+ "WASI's umask is a stub."
1855
1844
)
1856
1845
def test_exist_ok_s_isgid_directory (self ):
1857
1846
path = os .path .join (os_helper .TESTFN , 'dir1' )
@@ -2429,10 +2418,6 @@ def test_dup2(self):
2429
2418
self .check (os .dup2 , 20 )
2430
2419
2431
2420
@unittest .skipUnless (hasattr (os , 'dup2' ), 'test needs os.dup2()' )
2432
- @unittest .skipIf (
2433
- support .is_emscripten ,
2434
- "dup2() with negative fds is broken on Emscripten (see gh-102179)"
2435
- )
2436
2421
def test_dup2_negative_fd (self ):
2437
2422
valid_fd = os .open (__file__ , os .O_RDONLY )
2438
2423
self .addCleanup (os .close , valid_fd )
@@ -2457,14 +2442,14 @@ def test_fchown(self):
2457
2442
self .check (os .fchown , - 1 , - 1 )
2458
2443
2459
2444
@unittest .skipUnless (hasattr (os , 'fpathconf' ), 'test needs os.fpathconf()' )
2460
- @unittest .skipIf (
2461
- support .is_emscripten or support .is_wasi ,
2462
- "musl libc issue on Emscripten/WASI, bpo-46390"
2463
- )
2464
2445
def test_fpathconf (self ):
2465
2446
self .assertIn ("PC_NAME_MAX" , os .pathconf_names )
2466
- self .check (os .pathconf , "PC_NAME_MAX" )
2467
- self .check (os .fpathconf , "PC_NAME_MAX" )
2447
+ if not (support .is_emscripten or support .is_wasi ):
2448
+ # musl libc pathconf ignores the file descriptor and always returns
2449
+ # a constant, so the assertion that it should notice a bad file
2450
+ # descriptor and return EBADF fails.
2451
+ self .check (os .pathconf , "PC_NAME_MAX" )
2452
+ self .check (os .fpathconf , "PC_NAME_MAX" )
2468
2453
self .check_bool (os .pathconf , "PC_NAME_MAX" )
2469
2454
self .check_bool (os .fpathconf , "PC_NAME_MAX" )
2470
2455
@@ -3395,9 +3380,6 @@ def test_bad_fd(self):
3395
3380
@unittest .skipUnless (os .isatty (0 ) and not win32_is_iot () and (sys .platform .startswith ('win' ) or
3396
3381
(hasattr (locale , 'nl_langinfo' ) and hasattr (locale , 'CODESET' ))),
3397
3382
'test requires a tty and either Windows or nl_langinfo(CODESET)' )
3398
- @unittest .skipIf (
3399
- support .is_emscripten , "Cannot get encoding of stdin on Emscripten"
3400
- )
3401
3383
def test_device_encoding (self ):
3402
3384
encoding = os .device_encoding (0 )
3403
3385
self .assertIsNotNone (encoding )
0 commit comments