diff options
author | Raymond Hettinger <python@rcn.com> | 2009-03-03 07:12:09 (GMT) |
---|---|---|
committer | Raymond Hettinger <python@rcn.com> | 2009-03-03 07:12:09 (GMT) |
commit | f17f81d9c88370dac5b5553977c50b7a0a84a1d9 (patch) | |
tree | 3a670f73fda7c11a2a93d35ddbe9c50c548f51b8 /Lib | |
parent | a07038d6147bf0eefae1c469acf49a34ed40b35d (diff) | |
download | cpython-f17f81d9c88370dac5b5553977c50b7a0a84a1d9.zip cpython-f17f81d9c88370dac5b5553977c50b7a0a84a1d9.tar.gz cpython-f17f81d9c88370dac5b5553977c50b7a0a84a1d9.tar.bz2 |
Beef-up tests.
Diffstat (limited to 'Lib')
-rw-r--r-- | Lib/test/test_collections.py | 9 |
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)]) |