Fix for test_dict.py, thanks to Eduardo O Padoan.

This commit is contained in:
Guido van Rossum 2007-02-14 17:49:04 +00:00
parent d4588c18f2
commit e34cdd1bc1
2 changed files with 6 additions and 6 deletions

2
BROKEN
View File

@ -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

View File

@ -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)