summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_collections.py
diff options
context:
space:
mode:
authorYury Selivanov <yselivanov@sprymix.com>2015-05-30 14:49:27 (GMT)
committerYury Selivanov <yselivanov@sprymix.com>2015-05-30 14:49:27 (GMT)
commit802d45b6604b82ee636fdd795cc6a7d9e655855d (patch)
treec9d51cf8a24d9dbe295985d1823dc23efb1aa570 /Lib/test/test_collections.py
parent5844436adfa48b91ccd328c0bfd6ab1237a1311d (diff)
parente90982111ae1accc2a2ecaae94650a1d16a772ff (diff)
downloadcpython-802d45b6604b82ee636fdd795cc6a7d9e655855d.zip
cpython-802d45b6604b82ee636fdd795cc6a7d9e655855d.tar.gz
cpython-802d45b6604b82ee636fdd795cc6a7d9e655855d.tar.bz2
Merge 3.5
Diffstat (limited to 'Lib/test/test_collections.py')
-rw-r--r--Lib/test/test_collections.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/Lib/test/test_collections.py b/Lib/test/test_collections.py
index 3bb326a..c6db13e 100644
--- a/Lib/test/test_collections.py
+++ b/Lib/test/test_collections.py
@@ -1965,7 +1965,14 @@ class OrderedDictTests:
od = OrderedDict(**d)
self.assertGreater(sys.getsizeof(od), sys.getsizeof(d))
+ def test_views(self):
OrderedDict = self.module.OrderedDict
+ # See http://bugs.python.org/issue24286
+ s = 'the quick brown fox jumped over a lazy dog yesterday before dawn'.split()
+ od = OrderedDict.fromkeys(s)
+ self.assertEqual(od.keys(), dict(od).keys())
+ self.assertEqual(od.items(), dict(od).items())
+
def test_override_update(self):
OrderedDict = self.module.OrderedDict
# Verify that subclasses can override update() without breaking __init__()