Skip to content

Commit

Permalink
bpo-37555: cleaning up changes unnecessary to the final product
Browse files Browse the repository at this point in the history
  • Loading branch information
ElizabethU committed Jul 20, 2019
1 parent f295eac commit 18e964b
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions Lib/unittest/mock.py
Original file line number Diff line number Diff line change
Expand Up @@ -337,19 +337,13 @@ def __contains__(self, value):

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
Expand Down

0 comments on commit 18e964b

Please sign in to comment.