summaryrefslogtreecommitdiffstats
path: root/Lib/doctest.py
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2015-01-26 07:57:07 (GMT)
committerSerhiy Storchaka <storchaka@gmail.com>2015-01-26 07:57:07 (GMT)
commitf4b7a02e932671c6e54e6b48340173cc859ab4c0 (patch)
treeeaa9107bb2885a9ed40f9c697a31049826324dde /Lib/doctest.py
parent155ceaa454ad9a623cade5ed326e6e1e70ce109d (diff)
downloadcpython-f4b7a02e932671c6e54e6b48340173cc859ab4c0.zip
cpython-f4b7a02e932671c6e54e6b48340173cc859ab4c0.tar.gz
cpython-f4b7a02e932671c6e54e6b48340173cc859ab4c0.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 d212ad6..64e6d71 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))
@@ -547,9 +544,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))
@@ -2289,9 +2283,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))