diff options
author | Raymond Hettinger <python@rcn.com> | 2017-01-08 08:37:13 (GMT) |
---|---|---|
committer | Raymond Hettinger <python@rcn.com> | 2017-01-08 08:37:13 (GMT) |
commit | ec53b07ef1dabea192d6566b78e6f12d329967a6 (patch) | |
tree | f3d2be43ee2e87f33e09e55de7f79bd498ee4b97 | |
parent | d15bb2624809b6a1ca35d1effcd57c1508795c4f (diff) | |
download | cpython-ec53b07ef1dabea192d6566b78e6f12d329967a6.zip cpython-ec53b07ef1dabea192d6566b78e6f12d329967a6.tar.gz cpython-ec53b07ef1dabea192d6566b78e6f12d329967a6.tar.bz2 |
Add OrderedDict test for PEP 468 (guaranteed ordered of kwargs)
-rw-r--r-- | Lib/test/test_ordered_dict.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/Lib/test/test_ordered_dict.py b/Lib/test/test_ordered_dict.py index a35ed12..93f812a 100644 --- a/Lib/test/test_ordered_dict.py +++ b/Lib/test/test_ordered_dict.py @@ -52,6 +52,14 @@ class OrderedDictTests: self.assertEqual(list(d.items()), [('a', 1), ('b', 2), ('c', 3), ('d', 4), ('e', 5), ('f', 6), ('g', 7)]) + def test_468(self): + OrderedDict = self.OrderedDict + items = [('a', 1), ('b', 2), ('c', 3), ('d', 4), ('e', 5), ('f', 6), ('g', 7)] + shuffle(items) + argdict = OrderedDict(items) + d = OrderedDict(**argdict) + self.assertEqual(list(d.items()), items) + def test_update(self): OrderedDict = self.OrderedDict with self.assertRaises(TypeError): |