[3.11] gh-84461: Fix Emscripten umask and permission issues (GH-94002) (GH-94006)

Co-authored-by: Christian Heimes <christian@python.org>
This commit is contained in:
Christian Heimes 2022-06-19 20:18:34 +02:00 committed by GitHub
parent 15c8838273
commit 1073184918
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 23 additions and 0 deletions

View file

@ -787,6 +787,7 @@ class PosixTester(unittest.TestCase):
check_stat(uid, gid)
@os_helper.skip_unless_working_chmod
@unittest.skipIf(support.is_emscripten, "getgid() is a stub")
def test_chown(self):
# raise an OSError if the file does not exist
os.unlink(os_helper.TESTFN)
@ -798,6 +799,7 @@ class PosixTester(unittest.TestCase):
@os_helper.skip_unless_working_chmod
@unittest.skipUnless(hasattr(posix, 'fchown'), "test needs os.fchown()")
@unittest.skipIf(support.is_emscripten, "getgid() is a stub")
def test_fchown(self):
os.unlink(os_helper.TESTFN)
@ -1356,6 +1358,7 @@ class TestPosixDirFd(unittest.TestCase):
@unittest.skipUnless(hasattr(os, 'chown') and (os.chown in os.supports_dir_fd),
"test needs dir_fd support in os.chown()")
@unittest.skipIf(support.is_emscripten, "getgid() is a stub")
def test_chown_dir_fd(self):
with self.prepare_file() as (dir_fd, name, fullname):
posix.chown(name, os.getuid(), os.getgid(), dir_fd=dir_fd)