Issue #9626: Fix views in collections.OrderedDict().
diff --git a/Lib/test/test_collections.py b/Lib/test/test_collections.py
index a0f0fbc..f10f956 100644
--- a/Lib/test/test_collections.py
+++ b/Lib/test/test_collections.py
@@ -933,6 +933,12 @@
od['a'] = 1
self.assertEqual(list(od.items()), [('b', 2), ('a', 1)])
+ def test_views(self):
+ s = 'the quick brown fox jumped over a lazy dog yesterday before dawn'.split()
+ od = OrderedDict.fromkeys(s)
+ self.assertEqual(list(od.viewkeys()), s)
+ self.assertEqual(list(od.viewvalues()), [None for k in s])
+ self.assertEqual(list(od.viewitems()), [(k, None) for k in s])
class GeneralMappingTests(mapping_tests.BasicTestMappingProtocol):