diff options
author | Raymond Hettinger <python@rcn.com> | 2003-05-02 09:06:28 (GMT) |
---|---|---|
committer | Raymond Hettinger <python@rcn.com> | 2003-05-02 09:06:28 (GMT) |
commit | 91bbd9a7b9735cba07b06400a7c467aab6facfde (patch) | |
tree | 14bbad407135d461d54f8e1c066a93c6b9ef363d /Lib/test/test_glob.py | |
parent | 40006e9f7a38bbbcf564c541cb0f2022b952e409 (diff) | |
download | cpython-91bbd9a7b9735cba07b06400a7c467aab6facfde.zip cpython-91bbd9a7b9735cba07b06400a7c467aab6facfde.tar.gz cpython-91bbd9a7b9735cba07b06400a7c467aab6facfde.tar.bz2 |
Used sets.Set() to compare unordered sequences.
Improves clarity and brevity.
Diffstat (limited to 'Lib/test/test_glob.py')
-rw-r--r-- | Lib/test/test_glob.py | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/Lib/test/test_glob.py b/Lib/test/test_glob.py index cfc3077..a06ce9d 100644 --- a/Lib/test/test_glob.py +++ b/Lib/test/test_glob.py @@ -2,6 +2,7 @@ import unittest from test.test_support import run_unittest, TESTFN import glob import os +from sets import Set def mkdirs(fname): if os.path.exists(fname) or fname == '': @@ -61,11 +62,7 @@ class GlobTests(unittest.TestCase): return glob.glob(p) def assertSequencesEqual_noorder(self, l1, l2): - l1 = list(l1) - l2 = list(l2) - l1.sort() - l2.sort() - self.assertEqual(l1, l2) + self.assertEqual(Set(l1), Set(l2)) def test_glob_literal(self): eq = self.assertSequencesEqual_noorder |