summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
Diffstat (limited to 'Lib')
-rw-r--r--Lib/test/test_posix.py8
1 files changed, 1 insertions, 7 deletions
diff --git a/Lib/test/test_posix.py b/Lib/test/test_posix.py
index e7d0084..1119142 100644
--- a/Lib/test/test_posix.py
+++ b/Lib/test/test_posix.py
@@ -400,13 +400,7 @@ class PosixGroupsTester(unittest.TestCase):
def test_initgroups(self):
# find missing group
- groups = sorted(self.saved_groups)
- for g1,g2 in zip(groups[:-1], groups[1:]):
- g = g1 + 1
- if g < g2:
- break
- else:
- g = g2 + 1
+ g = max(self.saved_groups) + 1
name = pwd.getpwuid(posix.getuid()).pw_name
posix.initgroups(name, g)
self.assertIn(g, posix.getgroups())