fix test_posix.test_initgroups to work without supplemental groups (closes #20249)

This commit is contained in:
Benjamin Peterson 2014-03-01 19:14:12 -05:00
parent b77bf32685
commit 659a6f562b
1 changed files with 1 additions and 1 deletions

View File

@ -1144,7 +1144,7 @@ class PosixGroupsTester(unittest.TestCase):
def test_initgroups(self):
# find missing group
g = max(self.saved_groups) + 1
g = max(self.saved_groups or [0]) + 1
name = pwd.getpwuid(posix.getuid()).pw_name
posix.initgroups(name, g)
self.assertIn(g, posix.getgroups())