summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTim Peters <tim.peters@gmail.com>2006-04-11 01:59:34 (GMT)
committerTim Peters <tim.peters@gmail.com>2006-04-11 01:59:34 (GMT)
commit171b868195d6f4ffc08a94ff3cf02fde74f6e576 (patch)
treec63599f66c247217f9a56bd9c6ca5ee49821374e
parent527f652a8f0feaa8fba4b2d3f746dde6ebb55ce8 (diff)
downloadcpython-171b868195d6f4ffc08a94ff3cf02fde74f6e576.zip
cpython-171b868195d6f4ffc08a94ff3cf02fde74f6e576.tar.gz
cpython-171b868195d6f4ffc08a94ff3cf02fde74f6e576.tar.bz2
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.
-rw-r--r--Lib/test/test_descr.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/test/test_descr.py b/Lib/test/test_descr.py
index 455c2c6..32796bf 100644
--- a/Lib/test/test_descr.py
+++ b/Lib/test/test_descr.py
@@ -3043,7 +3043,7 @@ def subclasspropagation():
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 @@ def subclasspropagation():
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)