mirror of
https://github.com/python/cpython.git
synced 2025-08-31 05:58:33 +00:00
[3.11] gh-113090: Fix test.support.os_support.can_chmod() on Windows (GH-113091) (GH-113100)
(cherry picked from commit c6e953be12
)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
This commit is contained in:
parent
e0c6995b4f
commit
08ff6fa23d
4 changed files with 12 additions and 6 deletions
|
@ -788,7 +788,7 @@ class PosixTester(unittest.TestCase):
|
|||
self.assertRaises(TypeError, chown_func, first_param, uid, t(gid))
|
||||
check_stat(uid, gid)
|
||||
|
||||
@os_helper.skip_unless_working_chmod
|
||||
@unittest.skipUnless(hasattr(os, "chown"), "requires os.chown()")
|
||||
@unittest.skipIf(support.is_emscripten, "getgid() is a stub")
|
||||
def test_chown(self):
|
||||
# raise an OSError if the file does not exist
|
||||
|
@ -956,6 +956,7 @@ class PosixTester(unittest.TestCase):
|
|||
finally:
|
||||
posix.chmod(target, mode)
|
||||
|
||||
@os_helper.skip_unless_working_chmod
|
||||
def test_chmod_file(self):
|
||||
self.check_chmod(posix.chmod, os_helper.TESTFN)
|
||||
|
||||
|
@ -965,6 +966,7 @@ class PosixTester(unittest.TestCase):
|
|||
self.addCleanup(posix.rmdir, target)
|
||||
return target
|
||||
|
||||
@os_helper.skip_unless_working_chmod
|
||||
def test_chmod_dir(self):
|
||||
target = self.tempdir()
|
||||
self.check_chmod(posix.chmod, target)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue