diff options
author | Georg Brandl <georg@python.org> | 2010-08-01 20:55:37 (GMT) |
---|---|---|
committer | Georg Brandl <georg@python.org> | 2010-08-01 20:55:37 (GMT) |
commit | 5f6f6eb0bff52841ee18e5c6a96fe3600f44693d (patch) | |
tree | 8519ccd82c12ee4d05c83663b71b9c56cb772b56 | |
parent | 0f1470960cfef9f13a28dee7a81ca12d587a15b7 (diff) | |
download | cpython-5f6f6eb0bff52841ee18e5c6a96fe3600f44693d.zip cpython-5f6f6eb0bff52841ee18e5c6a96fe3600f44693d.tar.gz cpython-5f6f6eb0bff52841ee18e5c6a96fe3600f44693d.tar.bz2 |
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.
........
-rw-r--r-- | Lib/test/test_posix.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Lib/test/test_posix.py b/Lib/test/test_posix.py index a830c36..42ad1af 100644 --- a/Lib/test/test_posix.py +++ b/Lib/test/test_posix.py @@ -281,11 +281,11 @@ class PosixTester(unittest.TestCase): if not groups: raise unittest.SkipTest("need working 'id -G'") - # The order of groups isn't important, hence the calls - # to sorted. + # 'id -G' and 'os.getgroups()' should return the same + # groups, ignoring order and duplicates. self.assertEqual( - list(sorted([int(x) for x in groups.split()])), - list(sorted(posix.getgroups()))) + set([int(x) for x in groups.split()]), + set(posix.getgroups())) class PosixGroupsTester(unittest.TestCase): |