Skip to content

Commit

Permalink
Fix assertion in novice test for older numpy versions
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
stefanv committed Mar 3, 2016
1 parent 453efe9 commit 7caf88f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion skimage/novice/tests/test_novice.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
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,
Expand Down Expand Up @@ -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():
Expand Down

0 comments on commit 7caf88f

Please sign in to comment.