From a2964b3175b8faba0285ccfbd269411a4893444d Mon Sep 17 00:00:00 2001 From: Serhiy Storchaka Date: Thu, 21 Feb 2013 14:34:36 +0200 Subject: [PATCH] Issue #17248: Fix os.*chown() testing when user is in root group. --- Lib/test/test_posix.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Lib/test/test_posix.py b/Lib/test/test_posix.py index 5a26d649d38..865209d7c98 100644 --- a/Lib/test/test_posix.py +++ b/Lib/test/test_posix.py @@ -281,7 +281,7 @@ class PosixTester(unittest.TestCase): 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