mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
gh-113090: Fix test.support.os_support.can_chmod() on Windows (GH-113091)
This commit is contained in:
parent
23a5711100
commit
c6e953be12
4 changed files with 12 additions and 6 deletions
|
@ -791,7 +791,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