diff options
author | Guido van Rossum <guido@python.org> | 2006-08-21 23:36:26 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 2006-08-21 23:36:26 (GMT) |
commit | 389381564cfa936c8e50bc51dc53b55cba857652 (patch) | |
tree | 7259a38e0d6c06e5519276336ed26a593166de1d /BROKEN | |
parent | 5431ee4a499e173c5638297de30a965ed2206c66 (diff) | |
download | cpython-389381564cfa936c8e50bc51dc53b55cba857652.zip cpython-389381564cfa936c8e50bc51dc53b55cba857652.tar.gz cpython-389381564cfa936c8e50bc51dc53b55cba857652.tar.bz2 |
Change the way __hash__ is inherited; when __eq__ or __cmp__ is overridden
but __hash__ is not, set __hash__ explicitly to None (and tp_hash to NULL).
All unit tests pass now!
Diffstat (limited to 'BROKEN')
-rw-r--r-- | BROKEN | 61 |
1 files changed, 1 insertions, 60 deletions
@@ -1,60 +1 @@ -//////////////////////////////////////////////////////////////////////// -test_class -//////////////////////////////////////////////////////////////////////// - -test test_class failed -- hash(C1()) should raise <class 'exceptions.TypeError'> -Also hash(C2()) -Also stack blowout, recursing between -#5921 0x0003868c in slot_tp_call (self=0x5b0c90, args=0x338030, kwds=0x0) at ../Objects/typeobject.c:4583 -#5922 0x00021124 in PyObject_Call (func=0x5b0c90, arg=0x3384c0, kw=0x134e10) at ../Objects/abstract.c:1791 - -//////////////////////////////////////////////////////////////////////// -test_descr -//////////////////////////////////////////////////////////////////////// - -Testing hash of mutable subclasses... -Traceback (most recent call last): - File "../Lib/test/test_descr.py", line 4096, in <module> - test_main() - File "../Lib/test/test_descr.py", line 4059, in test_main - hashinherit() - File "../Lib/test/test_descr.py", line 3108, in hashinherit - raise TestFailed, "hash() of dict subclass should fail" -test.test_support.TestFailed: hash() of dict subclass should fail - - -//////////////////////////////////////////////////////////////////////// -test_set -//////////////////////////////////////////////////////////////////////// - -====================================================================== -FAIL: test_contains (__main__.TestSetSubclass) ----------------------------------------------------------------------- -Traceback (most recent call last): - File "../Lib/test/test_set.py", line 52, in test_contains - self.assert_(self.thetype(self.letters) in s) -AssertionError - -====================================================================== -FAIL: test_discard (__main__.TestSetSubclass) ----------------------------------------------------------------------- -Traceback (most recent call last): - File "../Lib/test/test_set.py", line 302, in test_discard - self.assert_(self.thetype(self.word) in s) -AssertionError - -====================================================================== -FAIL: test_hash (__main__.TestSetSubclass) ----------------------------------------------------------------------- -Traceback (most recent call last): - File "../Lib/test/test_set.py", line 265, in test_hash - self.assertRaises(TypeError, hash, self.s) -AssertionError: TypeError not raised - -====================================================================== -FAIL: test_remove (__main__.TestSetSubclass) ----------------------------------------------------------------------- -Traceback (most recent call last): - File "../Lib/test/test_set.py", line 291, in test_remove - self.assert_(self.thetype(self.word) in s) -AssertionError +(Nothing is broken at the moment AFAIK.) |