Test dict values iterator pickling with pickle.HIGHEST_PROTOCOL. (GH-9052)

(cherry picked from commit 1f36bf6077)

Co-authored-by: Sergey Fedoseev <fedoseev.sergey@gmail.com>
This commit is contained in:
Miss Islington (bot) 2018-09-10 03:45:54 -07:00 committed by GitHub
parent 9c9ac9e697
commit e9119a5de6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View 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())