mirror of
https://github.com/python/cpython
synced 2024-09-22 09:32:58 +00:00
Issue #17248: Fix os.*chown() testing when user is in root group.
This commit is contained in:
commit
fc9bf110a2
|
@ -453,7 +453,7 @@ def check_stat(uid, gid):
|
|||
check_stat(uid, gid)
|
||||
self.assertRaises(OSError, chown_func, first_param, 0, -1)
|
||||
check_stat(uid, gid)
|
||||
if gid != 0:
|
||||
if 0 not in os.getgroups():
|
||||
self.assertRaises(OSError, chown_func, first_param, -1, 0)
|
||||
check_stat(uid, gid)
|
||||
# test illegal types
|
||||
|
|
Loading…
Reference in a new issue