This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author r.david.murray
Recipients TonyFlury, docs@python, r.david.murray
Date 2014-09-01.01:25:03
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1409534703.88.0.72525192785.issue22318@psf.upfronthosting.co.za>
In-reply-to
Content
I'm not sure what you saw when "reading the code".  I don't see any 'a is b' in there (only 'elem is NULL', which is correct).  

This has nothing to do with unittest, and everything to do with how == is defined/implemented in python.  The invariant is that if two objects are equal, their hashes *must* be equal, and the hash check is used as a fastpath to skip items that are not equal without doing a full comparison. If you implement __eq__, you must implement __hash__ (or set it to None, thus marking the objects as not hashable).  Not doing so is an error in Python3 (and probably also in python2 if you are using new style classes, but I didn't check).

So, it is your objects that are buggy, I'm afraid, not unittest.
History
Date User Action Args
2014-09-01 01:25:03r.david.murraysetrecipients: + r.david.murray, docs@python, TonyFlury
2014-09-01 01:25:03r.david.murraysetmessageid: <1409534703.88.0.72525192785.issue22318@psf.upfronthosting.co.za>
2014-09-01 01:25:03r.david.murraylinkissue22318 messages
2014-09-01 01:25:03r.david.murraycreate