summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2014-03-02 00:14:12 (GMT)
committerBenjamin Peterson <benjamin@python.org>2014-03-02 00:14:12 (GMT)
commit659a6f562b0a6ed375b4708603a75150ed520694 (patch)
tree22210ab3747d043c17babc4d14e67f9382ec5271
parentb77bf326852f97f125ff57810a5f9663209414a7 (diff)
downloadcpython-659a6f562b0a6ed375b4708603a75150ed520694.zip
cpython-659a6f562b0a6ed375b4708603a75150ed520694.tar.gz
cpython-659a6f562b0a6ed375b4708603a75150ed520694.tar.bz2
fix test_posix.test_initgroups to work without supplemental groups (closes #20249)
-rw-r--r--Lib/test/test_posix.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/test/test_posix.py b/Lib/test/test_posix.py
index 9408e5c..5c09ebf 100644
--- a/Lib/test/test_posix.py
+++ b/Lib/test/test_posix.py
@@ -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())