ENH: Explicitly use __eq__ in assert_equal(a,b)

Fixes #2552. Changes primary test expression in function.