mirror of
https://github.com/python/cpython.git
synced 2025-08-30 05:35:08 +00:00
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:
parent
56b5daf159
commit
22fed605e0
20 changed files with 81 additions and 5 deletions
|
@ -1670,7 +1670,7 @@ class MakedirTests(unittest.TestCase):
|
|||
os.removedirs(path)
|
||||
|
||||
|
||||
@unittest.skipUnless(hasattr(os, 'chown'), "Test needs chown")
|
||||
@os_helper.skip_unless_working_chmod
|
||||
class ChownFileTests(unittest.TestCase):
|
||||
|
||||
@classmethod
|
||||
|
@ -3784,7 +3784,6 @@ class OSErrorTests(unittest.TestCase):
|
|||
def test_oserror_filename(self):
|
||||
funcs = [
|
||||
(self.filenames, os.chdir,),
|
||||
(self.filenames, os.chmod, 0o777),
|
||||
(self.filenames, os.lstat,),
|
||||
(self.filenames, os.open, os.O_RDONLY),
|
||||
(self.filenames, os.rmdir,),
|
||||
|
@ -3805,6 +3804,8 @@ class OSErrorTests(unittest.TestCase):
|
|||
(self.filenames, os.rename, "dst"),
|
||||
(self.filenames, os.replace, "dst"),
|
||||
))
|
||||
if os_helper.can_chmod():
|
||||
funcs.append((self.filenames, os.chmod, 0o777))
|
||||
if hasattr(os, "chown"):
|
||||
funcs.append((self.filenames, os.chown, 0, 0))
|
||||
if hasattr(os, "lchown"):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue