diff options
author | Tim Peters <tim.peters@gmail.com> | 2006-04-11 01:21:00 (GMT) |
---|---|---|
committer | Tim Peters <tim.peters@gmail.com> | 2006-04-11 01:21:00 (GMT) |
commit | 85b362f00783cc698ae6d2d08c2c95b88f5143a6 (patch) | |
tree | 4ed538413ceffb89719d64c91f4ed394fa251c88 /Lib/test/test_descr.py | |
parent | 678b8ecd086bd2170675da2681c77093f2f8c967 (diff) | |
download | cpython-85b362f00783cc698ae6d2d08c2c95b88f5143a6.zip cpython-85b362f00783cc698ae6d2d08c2c95b88f5143a6.tar.gz cpython-85b362f00783cc698ae6d2d08c2c95b88f5143a6.tar.bz2 |
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.
Diffstat (limited to 'Lib/test/test_descr.py')
-rw-r--r-- | Lib/test/test_descr.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/Lib/test/test_descr.py b/Lib/test/test_descr.py index 84c8b19..455c2c6 100644 --- a/Lib/test/test_descr.py +++ b/Lib/test/test_descr.py @@ -1763,6 +1763,9 @@ def specials(): 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 @@ def specials(): 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) |