New submission from Tony Flury:
The notes on assertItemsEqual do not make it clear that the comparison works by
using their hash value, and not their __eq__ implementation - i.e. it does an
'is' not an '==' between objects in the sequence.
If the sequences being compared contain user created
R. David Murray added the comment:
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
R. David Murray added the comment:
Is is an object identity test, by the way, it has nothing to do with __hash__.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22318
___