summaryrefslogtreecommitdiff
path: root/Lib/test/test_ordered_dict.py
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2015-12-03 22:27:31 +0200
committerSerhiy Storchaka <storchaka@gmail.com>2015-12-03 22:27:31 +0200
commit498f0f88898e8b0337c77bab0628969651ca9712 (patch)
tree59047ff9fbc9f071efbb7ecf839b30d067ffd3af /Lib/test/test_ordered_dict.py
parent054e86727183eadfe6b3615f7c60db8a41eda7cc (diff)
parentbd935cadbf4db87094302c4fd4344b2dd5c1494d (diff)
downloadcpython-498f0f88898e8b0337c77bab0628969651ca9712.tar.gz
Issue #6478: _strptime's regexp cache now is reset after changing timezone
with time.tzset().
Diffstat (limited to 'Lib/test/test_ordered_dict.py')
-rw-r--r--Lib/test/test_ordered_dict.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/Lib/test/test_ordered_dict.py b/Lib/test/test_ordered_dict.py
index 4b09227969..e64c7e5080 100644
--- a/Lib/test/test_ordered_dict.py
+++ b/Lib/test/test_ordered_dict.py
@@ -400,6 +400,14 @@ class OrderedDictTests:
od = OrderedDict(**d)
self.assertGreater(sys.getsizeof(od), sys.getsizeof(d))
+ def test_views(self):
+ OrderedDict = self.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.OrderedDict
# Verify that subclasses can override update() without breaking __init__()