[Python-3000-checkins] r53779 - in python/branches/p3yk: BROKEN Lib/test/test_dict.py

guido.van.rossum python-3000-checkins at python.org
Wed Feb 14 18:49:05 CET 2007


Author: guido.van.rossum
Date: Wed Feb 14 18:49:04 2007
New Revision: 53779

Modified:
   python/branches/p3yk/BROKEN
   python/branches/p3yk/Lib/test/test_dict.py
Log:
Fix for test_dict.py, thanks to Eduardo O Padoan.


Modified: python/branches/p3yk/BROKEN
==============================================================================
--- python/branches/p3yk/BROKEN	(original)
+++ python/branches/p3yk/BROKEN	Wed Feb 14 18:49:04 2007
@@ -1,4 +1,4 @@
-    test_bsddb test_bsddb3 test_compile test_dict test_dumbdbm
+    test_bsddb test_bsddb3 test_compile test_dumbdbm
     test_importhooks test_iter test_iterlen test_minidom test_mutants
     test_os test_pickletools test_plistlib test_richcmp test_shelve
     test_unittest test_userdict

Modified: python/branches/p3yk/Lib/test/test_dict.py
==============================================================================
--- python/branches/p3yk/Lib/test/test_dict.py	(original)
+++ python/branches/p3yk/Lib/test/test_dict.py	Wed Feb 14 18:49:04 2007
@@ -19,7 +19,7 @@
 
     def test_keys(self):
         d = {}
-        self.assertEqual(d.keys(), [])
+        self.assertEqual(set(d.keys()), set())
         d = {'a': 1, 'b': 2}
         k = d.keys()
         self.assert_('a' in d)
@@ -29,18 +29,18 @@
 
     def test_values(self):
         d = {}
-        self.assertEqual(d.values(), [])
+        self.assertEqual(set(d.values()), set())
         d = {1:2}
-        self.assertEqual(d.values(), [2])
+        self.assertEqual(set(d.values()), {2})
 
         self.assertRaises(TypeError, d.values, None)
 
     def test_items(self):
         d = {}
-        self.assertEqual(d.items(), [])
+        self.assertEqual(set(d.items()), set())
 
         d = {1:2}
-        self.assertEqual(d.items(), [(1, 2)])
+        self.assertEqual(set(d.items()), {(1, 2)})
 
         self.assertRaises(TypeError, d.items, None)
 


More information about the Python-3000-checkins mailing list