mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
Issue #28735: Fixed the comparison of mock.MagickMock with mock.ANY.
This commit is contained in:
commit
19dea2c726
3 changed files with 22 additions and 5 deletions
|
@ -1765,14 +1765,18 @@ def _get_eq(self):
|
|||
ret_val = self.__eq__._mock_return_value
|
||||
if ret_val is not DEFAULT:
|
||||
return ret_val
|
||||
return self is other
|
||||
if self is other:
|
||||
return True
|
||||
return NotImplemented
|
||||
return __eq__
|
||||
|
||||
def _get_ne(self):
|
||||
def __ne__(other):
|
||||
if self.__ne__._mock_return_value is not DEFAULT:
|
||||
return DEFAULT
|
||||
return self is not other
|
||||
if self is other:
|
||||
return False
|
||||
return NotImplemented
|
||||
return __ne__
|
||||
|
||||
def _get_iter(self):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue