mirror of
https://github.com/python/cpython.git
synced 2025-09-26 18:29:57 +00:00
Issue #17248: Fix os.*chown() testing when user is in root group.
This commit is contained in:
parent
bcbc5678d5
commit
a2964b3175
1 changed files with 1 additions and 1 deletions
|
@ -281,7 +281,7 @@ class PosixTester(unittest.TestCase):
|
||||||
check_stat(uid, gid)
|
check_stat(uid, gid)
|
||||||
self.assertRaises(OSError, chown_func, first_param, 0, -1)
|
self.assertRaises(OSError, chown_func, first_param, 0, -1)
|
||||||
check_stat(uid, gid)
|
check_stat(uid, gid)
|
||||||
if gid != 0:
|
if 0 not in os.getgroups():
|
||||||
self.assertRaises(OSError, chown_func, first_param, -1, 0)
|
self.assertRaises(OSError, chown_func, first_param, -1, 0)
|
||||||
check_stat(uid, gid)
|
check_stat(uid, gid)
|
||||||
# test illegal types
|
# test illegal types
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue