]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Test dict values iterator pickling with pickle.HIGHEST_PROTOCOL. (GH-9052)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Mon, 10 Sep 2018 10:32:53 +0000 (03:32 -0700)
committerGitHub <noreply@github.com>
Mon, 10 Sep 2018 10:32:53 +0000 (03:32 -0700)
(cherry picked from commit 1f36bf6077d93cb43fd84bea4a8a625fa772d1fa)

Co-authored-by: Sergey Fedoseev <fedoseev.sergey@gmail.com>
Lib/test/test_dict.py

index 4386eda3ae48fdd4a65d81e545d22a66b1e0384f..639e05f74a8a612173018631cfccb676f634a895 100644 (file)
@@ -1010,7 +1010,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())