From 18e964ba0126d8964d89842cb95534b63c2d326e Mon Sep 17 00:00:00 2001 From: Elizabeth Uselton Date: Sat, 20 Jul 2019 08:49:18 -0700 Subject: [PATCH] bpo-37555: cleaning up changes unnecessary to the final product --- Lib/unittest/mock.py | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/Lib/unittest/mock.py b/Lib/unittest/mock.py index aff5e70065a..01925539b34 100644 --- a/Lib/unittest/mock.py +++ b/Lib/unittest/mock.py @@ -337,19 +337,13 @@ class _CallList(list): for i in range(0, len_self - len_value + 1): sub_list = self[i:i+len_value] - if value == sub_list: + if sub_list == value: return True return False def __repr__(self): return pprint.pformat(list(self)) - def __eq__(self, other): - self_list = list(self) - other_list = list(other) - # checking equality both directions is necessary for ANY to work - return self_list == other_list or other_list == self_list - def _check_and_set_parent(parent, value, name, new_name): # function passed to create_autospec will have mock