gh-90473: Make chmod a dummy on WASI, skip chmod tests (GH-93534)

WASI does not have the ``chmod(2)`` syscall yet.
This commit is contained in:
Christian Heimes 2022-06-06 19:24:11 +02:00 committed by GitHub
parent 56b5daf159
commit 22fed605e0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
20 changed files with 81 additions and 5 deletions

View file

@ -42,6 +42,7 @@ class DumbDBMTestCase(unittest.TestCase):
self.read_helper(f)
@unittest.skipUnless(hasattr(os, 'umask'), 'test needs os.umask()')
@os_helper.skip_unless_working_chmod
def test_dumbdbm_creation_mode(self):
try:
old_umask = os.umask(0o002)
@ -265,6 +266,7 @@ class DumbDBMTestCase(unittest.TestCase):
"'r', 'w', 'c', or 'n'"):
dumbdbm.open(_fname, flag)
@os_helper.skip_unless_working_chmod
def test_readonly_files(self):
with os_helper.temp_dir() as dir:
fname = os.path.join(dir, 'db')