diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2015-01-26 08:04:15 (GMT) |
---|---|---|
committer | Serhiy Storchaka <storchaka@gmail.com> | 2015-01-26 08:04:15 (GMT) |
commit | 34af5023fc1e74c2d6a7537a11148885c84d9cb4 (patch) | |
tree | 7d0798f2543f647ac94acef12bd9ebc71fe6dd29 /Lib/unittest | |
parent | 4e1942bcd8a3904047bf96a16305f0e1e4736b5c (diff) | |
parent | f4b7a02e932671c6e54e6b48340173cc859ab4c0 (diff) | |
download | cpython-34af5023fc1e74c2d6a7537a11148885c84d9cb4.zip cpython-34af5023fc1e74c2d6a7537a11148885c84d9cb4.tar.gz cpython-34af5023fc1e74c2d6a7537a11148885c84d9cb4.tar.bz2 |
Issue #21408: The default __ne__() now returns NotImplemented if __eq__()
returned NotImplemented. Removed incorrect implementations of __ne__().
Diffstat (limited to 'Lib/unittest')
-rw-r--r-- | Lib/unittest/case.py | 3 | ||||
-rw-r--r-- | Lib/unittest/suite.py | 3 |
2 files changed, 0 insertions, 6 deletions
diff --git a/Lib/unittest/case.py b/Lib/unittest/case.py index aa00b7a..69888a5 100644 --- a/Lib/unittest/case.py +++ b/Lib/unittest/case.py @@ -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)) diff --git a/Lib/unittest/suite.py b/Lib/unittest/suite.py index 4997d81..76c4725 100644 --- a/Lib/unittest/suite.py +++ b/Lib/unittest/suite.py @@ -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) |