gh-127146: Emscripten: Make os.umask() actually work (#136706)

Provide a stub implementation of umask that is enough to get some tests passing.
More work is needed upstream in Emscripten to make all umask tests to pass.
This commit is contained in:
Hood Chatham 2025-07-16 15:33:15 +02:00 committed by GitHub
parent 8e2f4b4483
commit 12e52cad71
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 23 additions and 5 deletions

View file

@ -1918,11 +1918,9 @@ class MakedirTests(unittest.TestCase):
support.is_wasi,
"WASI's umask is a stub."
)
@unittest.skipIf(
support.is_emscripten,
"TODO: Fails in buildbot; see #135783"
)
def test_mode(self):
# Note: in some cases, the umask might already be 2 in which case this
# will pass even if os.umask is actually broken.
with os_helper.temp_umask(0o002):
base = os_helper.TESTFN
parent = os.path.join(base, 'dir1')