mirror of
https://github.com/python/cpython.git
synced 2025-12-08 06:10:17 +00:00
gh-141757: Comply with pickle protocol in test_reduce_5tuple (GH-141759)
The 5th element of the __reduce__ tuple should be an iterator.
This commit is contained in:
parent
e265ce8a56
commit
41b9ad5b38
1 changed files with 1 additions and 1 deletions
|
|
@ -672,7 +672,7 @@ def __eq__(self, other):
|
|||
def test_reduce_5tuple(self):
|
||||
class C(dict):
|
||||
def __reduce__(self):
|
||||
return (C, (), self.__dict__, None, self.items())
|
||||
return (C, (), self.__dict__, None, iter(self.items()))
|
||||
def __eq__(self, other):
|
||||
return (dict(self) == dict(other) and
|
||||
self.__dict__ == other.__dict__)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue