mirror of
https://github.com/python/cpython.git
synced 2026-01-26 21:03:34 +00:00
[3.14] gh-141757: Comply with pickle protocol in test_reduce_5tuple (GH-141759) (GH-141782)
The 5th element of the __reduce__ tuple should be an iterator. (cherry picked from commit 41b9ad5b38e913194a5cc88f0e7cfc096787b664) Co-authored-by: Arseny Boykov <36469655+Bobronium@users.noreply.github.com>
This commit is contained in:
parent
83cfd87568
commit
daf98fe5bd
@ -672,7 +672,7 @@ class TestCopy(unittest.TestCase):
|
||||
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…
x
Reference in New Issue
Block a user