summaryrefslogtreecommitdiff
path: root/Lib/test/test_posix.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/test/test_posix.py')
-rw-r--r--Lib/test/test_posix.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/Lib/test/test_posix.py b/Lib/test/test_posix.py
index 195df2654c..fb830ae9ec 100644
--- a/Lib/test/test_posix.py
+++ b/Lib/test/test_posix.py
@@ -315,11 +315,11 @@ class PosixTester(unittest.TestCase):
# This test needs 'id -G'
return
- # 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):
if posix.getuid() == 0 and hasattr(posix, 'getgroups') and sys.platform != 'darwin':