I want to make some unit-tests for my app, and I need to compare two arrays. Since array.__eq__ returns a new array (so TestCase.assertEqual fails)
array.__eq__
TestCase.assertEqual
Since Python 3.2 you can use assertSequenceEqual(array1.tolist(), array2.tolist()).
assertSequenceEqual(array1.tolist(), array2.tolist())
This has the added value of showing you the exact items in which the arrays differ.