mirror of
https://github.com/python/cpython.git
synced 2025-09-27 18:59:43 +00:00
Test dict values iterator pickling with pickle.HIGHEST_PROTOCOL. (GH-9052)
This commit is contained in:
parent
290a60bd8a
commit
1f36bf6077
1 changed files with 1 additions and 1 deletions
|
@ -1056,7 +1056,7 @@ class DictTest(unittest.TestCase):
|
||||||
self.assertEqual(dict(it), data)
|
self.assertEqual(dict(it), data)
|
||||||
|
|
||||||
def test_valuesiterator_pickling(self):
|
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 = {1:"a", 2:"b", 3:"c"}
|
||||||
# data.values() isn't picklable, only its iterator
|
# data.values() isn't picklable, only its iterator
|
||||||
it = iter(data.values())
|
it = iter(data.values())
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue