summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>2007-02-14 17:49:04 (GMT)
committerGuido van Rossum <guido@python.org>2007-02-14 17:49:04 (GMT)
commite34cdd1bc157f8e166d3693551445ae882f9fe7c (patch)
tree4e1323d7de5d6c0aa6f5697dbf7964a3a1c8cda3 /Lib
parentd4588c18f23cd4d2f0911528d3493f7067b423cf (diff)
downloadcpython-e34cdd1bc157f8e166d3693551445ae882f9fe7c.zip
cpython-e34cdd1bc157f8e166d3693551445ae882f9fe7c.tar.gz
cpython-e34cdd1bc157f8e166d3693551445ae882f9fe7c.tar.bz2
Fix for test_dict.py, thanks to Eduardo O Padoan.
Diffstat (limited to 'Lib')
-rw-r--r--Lib/test/test_dict.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/Lib/test/test_dict.py b/Lib/test/test_dict.py
index 1042cb1..fb4483a 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)