[Python-checkins] r45250 - python/trunk/Lib/test/test_descr.py
tim.peters
python-checkins at python.org
Tue Apr 11 03:21:01 CEST 2006
Author: tim.peters
Date: Tue Apr 11 03:21:00 2006
New Revision: 45250
Modified:
python/trunk/Lib/test/test_descr.py
Log:
specials(): squash another incorrect hash(x) == id(x)
test. Add some lines that at least invoke the default
__hash__, although there's nothing to check there beyond
that they don't blow up.
Modified: python/trunk/Lib/test/test_descr.py
==============================================================================
--- python/trunk/Lib/test/test_descr.py (original)
+++ python/trunk/Lib/test/test_descr.py Tue Apr 11 03:21:00 2006
@@ -1763,6 +1763,9 @@
c1 = C()
c2 = C()
verify(not not c1)
+ verify(id(c1) != id(c2))
+ hash(c1)
+ hash(c2)
vereq(cmp(c1, c2), cmp(id(c1), id(c2)))
vereq(c1, c1)
verify(c1 != c2)
@@ -1784,7 +1787,9 @@
d1 = D()
d2 = D()
verify(not not d1)
- vereq(hash(d1), id(d1))
+ verify(id(d1) != id(d2))
+ hash(d1)
+ hash(d2)
vereq(cmp(d1, d2), cmp(id(d1), id(d2)))
vereq(d1, d1)
verify(d1 != d2)
More information about the Python-checkins
mailing list