summaryrefslogtreecommitdiffstats
path: root/Lib/unittest.py
diff options
context:
space:
mode:
authorNick Coghlan <ncoghlan@gmail.com>2008-08-11 15:45:58 (GMT)
committerNick Coghlan <ncoghlan@gmail.com>2008-08-11 15:45:58 (GMT)
commit48361f5cbf419cce361fd1aa0389d6304ad167db (patch)
treee3fb92982d5564830f6ce9a3f725acc51553ec50 /Lib/unittest.py
parentf8d62d23e9b02c557b2bbe69f693fc14c2574281 (diff)
downloadcpython-48361f5cbf419cce361fd1aa0389d6304ad167db.zip
cpython-48361f5cbf419cce361fd1aa0389d6304ad167db.tar.gz
cpython-48361f5cbf419cce361fd1aa0389d6304ad167db.tar.bz2
Issue 2235: Py3k warnings are now emitted for classes that will no longer inherit a__hash__ implementation from a parent class in Python 3.x. The standard library and test suite have been updated to not emit these warnings.
Diffstat (limited to 'Lib/unittest.py')
-rw-r--r--Lib/unittest.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/Lib/unittest.py b/Lib/unittest.py
index b5a1a4b..09c6ca9 100644
--- a/Lib/unittest.py
+++ b/Lib/unittest.py
@@ -425,6 +425,9 @@ class TestSuite:
def __ne__(self, other):
return not self == other
+ # Can't guarantee hash invariant, so flag as unhashable
+ __hash__ = None
+
def __iter__(self):
return iter(self._tests)