[Python-checkins] r87959 - in python/branches/release31-maint: Lib/test/test_posix.py Misc/NEWS
antoine.pitrou
python-checkins at python.org
Wed Jan 12 19:50:36 CET 2011
Author: antoine.pitrou
Date: Wed Jan 12 19:50:35 2011
New Revision: 87959
Log:
Merged revisions 87958 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k
........
r87958 | antoine.pitrou | 2011-01-12 19:45:27 +0100 (mer., 12 janv. 2011) | 4 lines
Issue #10822: Fix test_posix:test_getgroups failure under Solaris. Patch
by Ross Lagerwall.
........
Modified:
python/branches/release31-maint/ (props changed)
python/branches/release31-maint/Lib/test/test_posix.py
python/branches/release31-maint/Misc/NEWS
Modified: python/branches/release31-maint/Lib/test/test_posix.py
==============================================================================
--- python/branches/release31-maint/Lib/test/test_posix.py (original)
+++ python/branches/release31-maint/Lib/test/test_posix.py Wed Jan 12 19:50:35 2011
@@ -274,6 +274,7 @@
os.chdir(curdir)
support.rmtree(base_path)
+ @unittest.skipUnless(hasattr(os, 'getegid'), "test needs os.getegid()")
def test_getgroups(self):
with os.popen('id -G') as idg:
groups = idg.read().strip()
@@ -283,9 +284,11 @@
# 'id -G' and 'os.getgroups()' should return the same
# groups, ignoring order and duplicates.
+ # #10822 - it is implementation defined whether posix.getgroups()
+ # includes the effective gid so we include it anyway, since id -G does
self.assertEqual(
set([int(x) for x in groups.split()]),
- set(posix.getgroups()))
+ set(posix.getgroups() + [posix.getegid()]))
class PosixGroupsTester(unittest.TestCase):
Modified: python/branches/release31-maint/Misc/NEWS
==============================================================================
--- python/branches/release31-maint/Misc/NEWS (original)
+++ python/branches/release31-maint/Misc/NEWS Wed Jan 12 19:50:35 2011
@@ -141,6 +141,9 @@
Tests
-----
+- Issue #10822: Fix test_posix:test_getgroups failure under Solaris. Patch
+ by Ross Lagerwall.
+
- Issue #6293: Have regrtest.py echo back sys.flags. This is done by default
in whole runs and enabled selectively using ``--header`` when running an
explicit list of tests. Original patch by Collin Winter.
More information about the Python-checkins
mailing list