We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f295eac commit 18e964bCopy full SHA for 18e964b
1 file changed
Lib/unittest/mock.py
@@ -337,19 +337,13 @@ def __contains__(self, value):
337
338
for i in range(0, len_self - len_value + 1):
339
sub_list = self[i:i+len_value]
340
- if value == sub_list:
+ if sub_list == value:
341
return True
342
return False
343
344
def __repr__(self):
345
return pprint.pformat(list(self))
346
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
-
353
354
def _check_and_set_parent(parent, value, name, new_name):
355
# function passed to create_autospec will have mock
0 commit comments