[issue22318] unitest documentation on assertItemsEqual misleading

2014-08-31 Thread Tony Flury
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

[issue22318] unitest documentation on assertItemsEqual misleading

2014-08-31 Thread R. David Murray
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

[issue22318] unitest documentation on assertItemsEqual misleading

2014-08-31 Thread R. David Murray
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 ___