Commit 659a6f56 authored by Benjamin Peterson's avatar Benjamin Peterson

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

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