mirror of
https://github.com/python/cpython.git
synced 2025-08-03 16:39:00 +00:00
Issue #21408: The default __ne__() now returns NotImplemented if __eq__()
returned NotImplemented. Removed incorrect implementations of __ne__().
This commit is contained in:
commit
34af5023fc
11 changed files with 77 additions and 47 deletions
|
@ -1342,9 +1342,6 @@ class FunctionTestCase(TestCase):
|
|||
self._testFunc == other._testFunc and \
|
||||
self._description == other._description
|
||||
|
||||
def __ne__(self, other):
|
||||
return not self == other
|
||||
|
||||
def __hash__(self):
|
||||
return hash((type(self), self._setUpFunc, self._tearDownFunc,
|
||||
self._testFunc, self._description))
|
||||
|
|
|
@ -31,9 +31,6 @@ class BaseTestSuite(object):
|
|||
return NotImplemented
|
||||
return list(self) == list(other)
|
||||
|
||||
def __ne__(self, other):
|
||||
return not self == other
|
||||
|
||||
def __iter__(self):
|
||||
return iter(self._tests)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue