Commit b633eab9 authored by Antoine Pitrou's avatar Antoine Pitrou

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.
........
parent de368717
...@@ -274,6 +274,7 @@ class PosixTester(unittest.TestCase): ...@@ -274,6 +274,7 @@ class PosixTester(unittest.TestCase):
os.chdir(curdir) os.chdir(curdir)
support.rmtree(base_path) support.rmtree(base_path)
@unittest.skipUnless(hasattr(os, 'getegid'), "test needs os.getegid()")
def test_getgroups(self): def test_getgroups(self):
with os.popen('id -G') as idg: with os.popen('id -G') as idg:
groups = idg.read().strip() groups = idg.read().strip()
...@@ -283,9 +284,11 @@ class PosixTester(unittest.TestCase): ...@@ -283,9 +284,11 @@ class PosixTester(unittest.TestCase):
# 'id -G' and 'os.getgroups()' should return the same # 'id -G' and 'os.getgroups()' should return the same
# groups, ignoring order and duplicates. # 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( self.assertEqual(
set([int(x) for x in groups.split()]), set([int(x) for x in groups.split()]),
set(posix.getgroups())) set(posix.getgroups() + [posix.getegid()]))
class PosixGroupsTester(unittest.TestCase): class PosixGroupsTester(unittest.TestCase):
......
...@@ -141,6 +141,9 @@ Build ...@@ -141,6 +141,9 @@ Build
Tests 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 - 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 in whole runs and enabled selectively using ``--header`` when running an
explicit list of tests. Original patch by Collin Winter. explicit list of tests. Original patch by Collin Winter.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment