diff options
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)]) |