diff options
| author | Ronald Oussoren <ronaldoussoren@mac.com> | 2010-08-03 07:31:12 (GMT) |
|---|---|---|
| committer | Ronald Oussoren <ronaldoussoren@mac.com> | 2010-08-03 07:31:12 (GMT) |
| commit | ac72e58a279bb8a46047c87ddd7eeb0886a07692 (patch) | |
| tree | 29367ae86175621db38ddda5b204db2544e340fc /Lib/test/test_posix.py | |
| parent | 290142680b6d5792ef9e0d37d673e6b72d4690d2 (diff) | |
| download | cpython-ac72e58a279bb8a46047c87ddd7eeb0886a07692.zip cpython-ac72e58a279bb8a46047c87ddd7eeb0886a07692.tar.gz cpython-ac72e58a279bb8a46047c87ddd7eeb0886a07692.tar.bz2 | |
Merged revisions 83431 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k
........
r83431 | ronald.oussoren | 2010-08-01 21:18:13 +0200 (Sun, 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.
........
Diffstat (limited to 'Lib/test/test_posix.py')
| -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 e069bf8..e7d0084 100644 --- a/Lib/test/test_posix.py +++ b/Lib/test/test_posix.py @@ -371,11 +371,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): |
