From: Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> Date: Mon, 10 Sep 2018 10:45:54 +0000 (-0700) Subject: Test dict values iterator pickling with pickle.HIGHEST_PROTOCOL. (GH-9052) X-Git-Tag: v3.7.1rc1~106 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=e9119a5de67d5525f3be957fda239143453513bd;p=thirdparty%2FPython%2Fcpython.git Test dict values iterator pickling with pickle.HIGHEST_PROTOCOL. (GH-9052) (cherry picked from commit 1f36bf6077d93cb43fd84bea4a8a625fa772d1fa) Co-authored-by: Sergey Fedoseev --- diff --git a/Lib/test/test_dict.py b/Lib/test/test_dict.py index aa149d31eb0e..38521bbf6630 100644 --- a/Lib/test/test_dict.py +++ b/Lib/test/test_dict.py @@ -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())