diff -r 07e2874779d9 -r e55eb02d94fa Lib/test/test_posix.py --- a/Lib/test/test_posix.py Sun Jan 09 10:31:01 2011 +0100 +++ b/Lib/test/test_posix.py Tue Jan 11 08:48:18 2011 +0200 @@ -373,6 +373,7 @@ os.chdir(curdir) support.rmtree(base_path) + @unittest.skipUnless(hasattr(os, 'getegid'), "test needs os.getegid()") def test_getgroups(self): with os.popen('id -G') as idg: groups = idg.read().strip() @@ -382,9 +383,11 @@ # 'id -G' and 'os.getgroups()' should return the same # groups, ignoring order and duplicates. + # #10822 - it is implementation defined whether posix.getgroups() + # includes the effective gid so we include it anyway, since id -G does self.assertEqual( set([int(x) for x in groups.split()]), - set(posix.getgroups())) + set(posix.getgroups() + [posix.getegid()])) class PosixGroupsTester(unittest.TestCase):