bpo-40280: Skip more tests on Emscripten (GH-31947) · python/cpython@ef1327e

@@ -181,6 +181,9 @@ def test_access(self):

181181

os.close(f)

182182

self.assertTrue(os.access(os_helper.TESTFN, os.W_OK))

183183184+

@unittest.skipIf(

185+

support.is_emscripten, "Test is unstable under Emscripten."

186+

)

184187

def test_closerange(self):

185188

first = os.open(os_helper.TESTFN, os.O_CREAT|os.O_RDWR)

186189

# We must allocate two consecutive file descriptors, otherwise

@@ -1578,6 +1581,7 @@ def test_makedir(self):

15781581

'dir5', 'dir6')

15791582

os.makedirs(path)

158015831584+

@unittest.skipIf(support.is_emscripten, "Emscripten's umask is a stub.")

15811585

def test_mode(self):

15821586

with os_helper.temp_umask(0o002):

15831587

base = os_helper.TESTFN

@@ -2158,6 +2162,9 @@ def test_fchown(self):

21582162

self.check(os.fchown, -1, -1)

2159216321602164

@unittest.skipUnless(hasattr(os, 'fpathconf'), 'test needs os.fpathconf()')

2165+

@unittest.skipIf(

2166+

support.is_emscripten, "musl libc issue on Emscripten, bpo-46390"

2167+

)

21612168

def test_fpathconf(self):

21622169

self.check(os.pathconf, "PC_NAME_MAX")

21632170

self.check(os.fpathconf, "PC_NAME_MAX")

@@ -4058,6 +4065,7 @@ def test_path_t_converter_and_custom_class(self):

4058406540594066

@unittest.skipUnless(hasattr(os, 'get_blocking'),

40604067

'needs os.get_blocking() and os.set_blocking()')

4068+

@unittest.skipIf(support.is_emscripten, "Cannot unset blocking flag")

40614069

class BlockingTests(unittest.TestCase):

40624070

def test_blocking(self):

40634071

fd = os.open(__file__, os.O_RDONLY)

@@ -4513,7 +4521,7 @@ def test_times(self):

45134521

self.assertEqual(times.elapsed, 0)

45144522451545234516-

@requires_os_func('fork')

4524+

@support.requires_fork()

45174525

class ForkTests(unittest.TestCase):

45184526

def test_fork(self):

45194527

# bpo-42540: ensure os.fork() with non-default memory allocator does