summaryrefslogtreecommitdiffstats
path: root/Lib/doctest.py
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2015-01-26 08:04:15 (GMT)
committerSerhiy Storchaka <storchaka@gmail.com>2015-01-26 08:04:15 (GMT)
commit34af5023fc1e74c2d6a7537a11148885c84d9cb4 (patch)
tree7d0798f2543f647ac94acef12bd9ebc71fe6dd29 /Lib/doctest.py
parent4e1942bcd8a3904047bf96a16305f0e1e4736b5c (diff)
parentf4b7a02e932671c6e54e6b48340173cc859ab4c0 (diff)
downloadcpython-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/doctest.py')
-rw-r--r--Lib/doctest.py9
1 files changed, 0 insertions, 9 deletions
diff --git a/Lib/doctest.py b/Lib/doctest.py
index bb9f432..7d5bcf4 100644
--- a/Lib/doctest.py
+++ b/Lib/doctest.py
@@ -481,9 +481,6 @@ class Example:
self.options == other.options and \
self.exc_msg == other.exc_msg
- def __ne__(self, other):
- return not self == other
-
def __hash__(self):
return hash((self.source, self.want, self.lineno, self.indent,
self.exc_msg))
@@ -548,9 +545,6 @@ class DocTest:
self.filename == other.filename and \
self.lineno == other.lineno
- def __ne__(self, other):
- return not self == other
-
def __hash__(self):
return hash((self.docstring, self.name, self.filename, self.lineno))
@@ -2291,9 +2285,6 @@ class DocTestCase(unittest.TestCase):
self._dt_tearDown == other._dt_tearDown and \
self._dt_checker == other._dt_checker
- def __ne__(self, other):
- return not self == other
-
def __hash__(self):
return hash((self._dt_optionflags, self._dt_setUp, self._dt_tearDown,
self._dt_checker))