diff options
author | Antoine Pitrou <solipsis@pitrou.net> | 2011-01-12 18:56:09 +0000 |
---|---|---|
committer | Antoine Pitrou <solipsis@pitrou.net> | 2011-01-12 18:56:09 +0000 |
commit | 8bc59fae569dc0fec9bac719e23e7d5431f756c0 (patch) | |
tree | 89207b8326d65576b4c9dfefca5d24ac68e032ee /Lib/test/test_posix.py | |
parent | 9b911ca14d4897e517276cb9729ecc6ad6c178db (diff) | |
download | cpython-git-8bc59fae569dc0fec9bac719e23e7d5431f756c0.tar.gz |
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.
........
Diffstat (limited to 'Lib/test/test_posix.py')
-rw-r--r-- | Lib/test/test_posix.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/Lib/test/test_posix.py b/Lib/test/test_posix.py index e2ef2cfaf4..a5db21eefb 100644 --- a/Lib/test/test_posix.py +++ b/Lib/test/test_posix.py @@ -370,6 +370,7 @@ class PosixTester(unittest.TestCase): os.chdir(curdir) shutil.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() @@ -379,9 +380,11 @@ class PosixTester(unittest.TestCase): # '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): |