[Python-checkins] r87958 - in python/branches/py3k: Lib/test/test_posix.py Misc/NEWS
antoine.pitrou
python-checkins at python.org
Wed Jan 12 19:45:27 CET 2011
Author: antoine.pitrou
Date: Wed Jan 12 19:45:27 2011
New Revision: 87958
Log:
Issue #10822: Fix test_posix:test_getgroups failure under Solaris. Patch
by Ross Lagerwall.
Modified:
python/branches/py3k/Lib/test/test_posix.py
python/branches/py3k/Misc/NEWS
Modified: python/branches/py3k/Lib/test/test_posix.py
==============================================================================
--- python/branches/py3k/Lib/test/test_posix.py (original)
+++ python/branches/py3k/Lib/test/test_posix.py Wed Jan 12 19:45:27 2011
@@ -373,6 +373,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()
@@ -382,9 +383,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/py3k/Misc/NEWS
==============================================================================
--- python/branches/py3k/Misc/NEWS (original)
+++ python/branches/py3k/Misc/NEWS Wed Jan 12 19:45:27 2011
@@ -223,6 +223,9 @@
Tests
-----
+- Issue #10822: Fix test_posix:test_getgroups failure under Solaris. Patch
+ by Ross Lagerwall.
+
- Make the --coverage flag work for test.regrtest.
- Issue #1677694: Refactor and improve test_timeout. Original patch by
More information about the Python-checkins
mailing list