gh-59616: Support os.chmod(follow_symlinks=True) and os.lchmod() on Windows (GH-113049)

This commit is contained in:
Serhiy Storchaka 2023-12-14 13:28:37 +02:00 committed by GitHub
parent c6e953be12
commit 29f7eb4859
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 93 additions and 28 deletions

View file

@ -1019,7 +1019,7 @@ class PosixTester(unittest.TestCase):
self.check_lchmod_link(posix.chmod, target, link)
else:
self.check_chmod_link(posix.chmod, target, link)
self.check_chmod_link(posix.chmod, target, link, follow_symlinks=True)
self.check_chmod_link(posix.chmod, target, link, follow_symlinks=True)
@os_helper.skip_unless_symlink
def test_chmod_dir_symlink(self):
@ -1031,7 +1031,7 @@ class PosixTester(unittest.TestCase):
self.check_lchmod_link(posix.chmod, target, link)
else:
self.check_chmod_link(posix.chmod, target, link)
self.check_chmod_link(posix.chmod, target, link, follow_symlinks=True)
self.check_chmod_link(posix.chmod, target, link, follow_symlinks=True)
@unittest.skipUnless(hasattr(posix, 'lchmod'), 'test needs os.lchmod()')
@os_helper.skip_unless_symlink