(original) (raw)
changeset: 82299:d49685548a7a parent: 82295:a11ddd687a0b parent: 82298:a4e348c4b5d3 user: Serhiy Storchaka storchaka@gmail.com date: Thu Feb 21 14:35:51 2013 +0200 files: Lib/test/test_posix.py description: Issue #17248: Fix os.*chown() testing when user is in root group. diff -r a11ddd687a0b -r d49685548a7a Lib/test/test_posix.py --- a/Lib/test/test_posix.py Thu Feb 21 12:35:57 2013 +0200 +++ b/Lib/test/test_posix.py Thu Feb 21 14:35:51 2013 +0200 @@ -453,7 +453,7 @@ 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 /storchaka@gmail.com