mirror of
https://github.com/python/cpython.git
synced 2025-09-26 18:29:57 +00:00
Merged revisions 83431 via svnmerge from
svn+ssh://svn.python.org/python/branches/py3k ........ r83431 | ronald.oussoren | 2010-08-01 21:18:13 +0200 (So, 01 Aug 2010) | 6 lines test_getgroups as introduced with issue7900 failed on systems where 'id -G' and posix.getgroups() returned the same information, but one of the sources contains duplicate information. Rewrite the check using sets instead of lists. ........
This commit is contained in:
parent
0f1470960c
commit
5f6f6eb0bf
1 changed files with 4 additions and 4 deletions
|
@ -281,11 +281,11 @@ class PosixTester(unittest.TestCase):
|
||||||
if not groups:
|
if not groups:
|
||||||
raise unittest.SkipTest("need working 'id -G'")
|
raise unittest.SkipTest("need working 'id -G'")
|
||||||
|
|
||||||
# The order of groups isn't important, hence the calls
|
# 'id -G' and 'os.getgroups()' should return the same
|
||||||
# to sorted.
|
# groups, ignoring order and duplicates.
|
||||||
self.assertEqual(
|
self.assertEqual(
|
||||||
list(sorted([int(x) for x in groups.split()])),
|
set([int(x) for x in groups.split()]),
|
||||||
list(sorted(posix.getgroups())))
|
set(posix.getgroups()))
|
||||||
|
|
||||||
class PosixGroupsTester(unittest.TestCase):
|
class PosixGroupsTester(unittest.TestCase):
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue