]> granicus.if.org Git - python/commitdiff
#10159: sort completion matches before comparing to dir() result.
authorGeorg Brandl <georg@python.org>
Thu, 21 Oct 2010 07:40:03 +0000 (07:40 +0000)
committerGeorg Brandl <georg@python.org>
Thu, 21 Oct 2010 07:40:03 +0000 (07:40 +0000)
Lib/test/test_rlcompleter.py

index 29e6a1b2e780d6513dae8b921ef90c89a19304db..11a7bd2f719ca9ff21c378dd43b5f02699f6b4fb 100644 (file)
@@ -31,9 +31,9 @@ class TestRlcompleter(unittest.TestCase):
 
     def test_global_matches(self):
         # test with builtins namespace
-        self.assertEqual(self.stdcompleter.global_matches('di'),
+        self.assertEqual(sorted(self.stdcompleter.global_matches('di')),
                          [x+'(' for x in dir(builtins) if x.startswith('di')])
-        self.assertEqual(self.stdcompleter.global_matches('st'),
+        self.assertEqual(sorted(self.stdcompleter.global_matches('st')),
                          [x+'(' for x in dir(builtins) if x.startswith('st')])
         self.assertEqual(self.stdcompleter.global_matches('akaksajadhak'), [])