Fix for test_dict.py, thanks to Eduardo O Padoan.
This commit is contained in:
parent
d4588c18f2
commit
e34cdd1bc1
2
BROKEN
2
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_importhooks test_iter test_iterlen test_minidom test_mutants
|
||||||
test_os test_pickletools test_plistlib test_richcmp test_shelve
|
test_os test_pickletools test_plistlib test_richcmp test_shelve
|
||||||
test_unittest test_userdict
|
test_unittest test_userdict
|
||||||
|
|
|
@ -19,7 +19,7 @@ class DictTest(unittest.TestCase):
|
||||||
|
|
||||||
def test_keys(self):
|
def test_keys(self):
|
||||||
d = {}
|
d = {}
|
||||||
self.assertEqual(d.keys(), [])
|
self.assertEqual(set(d.keys()), set())
|
||||||
d = {'a': 1, 'b': 2}
|
d = {'a': 1, 'b': 2}
|
||||||
k = d.keys()
|
k = d.keys()
|
||||||
self.assert_('a' in d)
|
self.assert_('a' in d)
|
||||||
|
@ -29,18 +29,18 @@ class DictTest(unittest.TestCase):
|
||||||
|
|
||||||
def test_values(self):
|
def test_values(self):
|
||||||
d = {}
|
d = {}
|
||||||
self.assertEqual(d.values(), [])
|
self.assertEqual(set(d.values()), set())
|
||||||
d = {1:2}
|
d = {1:2}
|
||||||
self.assertEqual(d.values(), [2])
|
self.assertEqual(set(d.values()), {2})
|
||||||
|
|
||||||
self.assertRaises(TypeError, d.values, None)
|
self.assertRaises(TypeError, d.values, None)
|
||||||
|
|
||||||
def test_items(self):
|
def test_items(self):
|
||||||
d = {}
|
d = {}
|
||||||
self.assertEqual(d.items(), [])
|
self.assertEqual(set(d.items()), set())
|
||||||
|
|
||||||
d = {1:2}
|
d = {1:2}
|
||||||
self.assertEqual(d.items(), [(1, 2)])
|
self.assertEqual(set(d.items()), {(1, 2)})
|
||||||
|
|
||||||
self.assertRaises(TypeError, d.items, None)
|
self.assertRaises(TypeError, d.items, None)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue