From: Antoine Pitrou Date: Sun, 18 Dec 2011 19:22:50 +0000 (+0100) Subject: Followup to #7502: add __hash__ method and tests. X-Git-Tag: v3.3.0a1~569 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=7bfe89945b6960bb68e27fd25fea421eee9b1fca;p=thirdparty%2FPython%2Fcpython.git Followup to #7502: add __hash__ method and tests. --- 7bfe89945b6960bb68e27fd25fea421eee9b1fca diff --cc Lib/doctest.py index 5d315cc5a3e5,234733e5651c..aba98dc5a354 --- a/Lib/doctest.py +++ b/Lib/doctest.py @@@ -454,7 -454,11 +454,10 @@@ class Example def __ne__(self, other): return not self == other + def __hash__(self): + return hash((self.source, self.want, self.lineno, self.indent, + self.exc_msg)) - class DocTest: """ A collection of doctest examples that should be run in a single