Fix assertion in novice test for older numpy versions

For older versions of numpy, `assert_equal(a, b)` failed for arbitrary objects
`a` and `b` even if they had ``__eq__`` defined.  This is now fixed, but the
test is changed to use ``assert_true(a == b)`` to be backward compatible.
This commit is contained in:
Stefan van der Walt
2016-03-02 18:09:09 -08:00
parent 453efe974d
commit 7caf88f6ee
+2 -1
View File
@@ -2,6 +2,7 @@ import os
import tempfile
import numpy as np
from nose.tools import assert_true
from numpy.testing import assert_equal, raises, assert_allclose
from skimage import novice
from skimage.novice._novice import (array_to_xy_origin, xy_to_array_origin,
@@ -140,7 +141,7 @@ def test_reset():
v = pic[0, 0]
pic[0, 0] = (1, 1, 1)
pic.reset()
assert_equal(pic[0, 0], v)
assert_true(pic[0, 0] == v)
def test_update_on_save():