]> granicus.if.org Git - python/commitdiff
Test dict values iterator pickling with pickle.HIGHEST_PROTOCOL. (GH-9052)
authorSergey Fedoseev <fedoseev.sergey@gmail.com>
Mon, 10 Sep 2018 09:42:09 +0000 (14:42 +0500)
committerXiang Zhang <angwerzx@126.com>
Mon, 10 Sep 2018 09:42:09 +0000 (17:42 +0800)
Lib/test/test_dict.py

index aa149d31eb0e22cec78d5f61f96d207057f986aa..38521bbf663052621da702c2c356afe759044e2f 100644 (file)
@@ -1056,7 +1056,7 @@ class DictTest(unittest.TestCase):
             self.assertEqual(dict(it), data)
 
     def test_valuesiterator_pickling(self):
-        for proto in range(pickle.HIGHEST_PROTOCOL):
+        for proto in range(pickle.HIGHEST_PROTOCOL + 1):
             data = {1:"a", 2:"b", 3:"c"}
             # data.values() isn't picklable, only its iterator
             it = iter(data.values())