From e34cdd1bc157f8e166d3693551445ae882f9fe7c Mon Sep 17 00:00:00 2001 From: Guido van Rossum Date: Wed, 14 Feb 2007 17:49:04 +0000 Subject: [PATCH] Fix for test_dict.py, thanks to Eduardo O Padoan. --- BROKEN | 2 +- Lib/test/test_dict.py | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/BROKEN b/BROKEN index cc2dec32500..82820cd79c2 100644 --- a/BROKEN +++ b/BROKEN @@ -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 diff --git a/Lib/test/test_dict.py b/Lib/test/test_dict.py index 1042cb12d88..fb4483a4bfd 100644 --- a/Lib/test/test_dict.py +++ b/Lib/test/test_dict.py @@ -19,7 +19,7 @@ class DictTest(unittest.TestCase): 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 @@ class DictTest(unittest.TestCase): 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)