mirror of https://github.com/python/cpython
fix test_posix.test_initgroups to work without supplemental groups (closes #20249)
This commit is contained in:
parent
b77bf32685
commit
659a6f562b
|
@ -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())
|
||||
|
|
Loading…
Reference in New Issue