[Python-checkins] r45255 - python/trunk/Lib/test/test_descr.py
tim.peters
python-checkins at python.org
Tue Apr 11 03:59:35 CEST 2006
Author: tim.peters
Date: Tue Apr 11 03:59:34 2006
New Revision: 45255
Modified:
python/trunk/Lib/test/test_descr.py
Log:
subclasspropagation(): Squash two more bogus hash(x) == id(x)
tests. Alas, because only the "x86 OpenBSD trunk" buildbot fails
these tests, and test_descr stops after the first failure, there's
no sane way for me to fix these short of fixing one and then
waiting for the buildbot to reveal the next one.
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:59:34 2006
@@ -3043,7 +3043,7 @@
class D(B, C):
pass
d = D()
- vereq(hash(d), id(d))
+ orig_hash = hash(d) # related to id(d) in platform-dependent ways
A.__hash__ = lambda self: 42
vereq(hash(d), 42)
C.__hash__ = lambda self: 314
@@ -3059,7 +3059,7 @@
del C.__hash__
vereq(hash(d), 42)
del A.__hash__
- vereq(hash(d), id(d))
+ vereq(hash(d), orig_hash)
d.foo = 42
d.bar = 42
vereq(d.foo, 42)
More information about the Python-checkins
mailing list