Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 18e964b

Browse files
committed
bpo-37555: cleaning up changes unnecessary to the final product
1 parent f295eac commit 18e964b

1 file changed

Lines changed: 1 addition & 7 deletions

File tree

Lib/unittest/mock.py

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -337,19 +337,13 @@ def __contains__(self, value):
337337

338338
for i in range(0, len_self - len_value + 1):
339339
sub_list = self[i:i+len_value]
340-
if value == sub_list:
340+
if sub_list == value:
341341
return True
342342
return False
343343

344344
def __repr__(self):
345345
return pprint.pformat(list(self))
346346

347-
def __eq__(self, other):
348-
self_list = list(self)
349-
other_list = list(other)
350-
# checking equality both directions is necessary for ANY to work
351-
return self_list == other_list or other_list == self_list
352-
353347

354348
def _check_and_set_parent(parent, value, name, new_name):
355349
# function passed to create_autospec will have mock

0 commit comments

Comments
 (0)