summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorRaymond Hettinger <python@rcn.com>2009-03-03 07:12:09 (GMT)
committerRaymond Hettinger <python@rcn.com>2009-03-03 07:12:09 (GMT)
commitf17f81d9c88370dac5b5553977c50b7a0a84a1d9 (patch)
tree3a670f73fda7c11a2a93d35ddbe9c50c548f51b8 /Lib
parenta07038d6147bf0eefae1c469acf49a34ed40b35d (diff)
downloadcpython-f17f81d9c88370dac5b5553977c50b7a0a84a1d9.zip
cpython-f17f81d9c88370dac5b5553977c50b7a0a84a1d9.tar.gz
cpython-f17f81d9c88370dac5b5553977c50b7a0a84a1d9.tar.bz2
Beef-up tests.
Diffstat (limited to 'Lib')
-rw-r--r--Lib/test/test_collections.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/Lib/test/test_collections.py b/Lib/test/test_collections.py
index 12b1217..95022a1 100644
--- a/Lib/test/test_collections.py
+++ b/Lib/test/test_collections.py
@@ -645,9 +645,12 @@ class TestOrderedDict(unittest.TestCase):
shuffle(pairs)
od = OrderedDict(pairs)
self.assertEqual(list(od), [t[0] for t in pairs])
- self.assertEqual(list(od.keys()), [t[0] for t in pairs])
- self.assertEqual(list(od.values()), [t[1] for t in pairs])
- self.assertEqual(list(od.items()), pairs)
+ self.assertEqual(od.keys()[:], [t[0] for t in pairs])
+ self.assertEqual(od.values()[:], [t[1] for t in pairs])
+ self.assertEqual(od.items()[:], pairs)
+ self.assertEqual(list(od.iterkeys()), [t[0] for t in pairs])
+ self.assertEqual(list(od.itervalues()), [t[1] for t in pairs])
+ self.assertEqual(list(od.iteritems()), pairs)
self.assertEqual(list(reversed(od)),
[t[0] for t in reversed(pairs)])