Commit 9d202ba2 authored by Serhiy Storchaka's avatar Serhiy Storchaka

Issue #17248: Fix os.*chown() testing when user is in root group.

parents 4d6795e1 a2964b31
...@@ -453,7 +453,7 @@ class PosixTester(unittest.TestCase): ...@@ -453,7 +453,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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment