mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
[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:
parent
15c8838273
commit
1073184918
4 changed files with 23 additions and 0 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue