FIX: prepend np.testing. to assert_* statements

Resolve a simple namespace problem, eliminating 15 errors in
tests Travis doesn't catch because Travis doesn't build SimpleITK
This commit is contained in:
Josh Warner (Mac)
2013-06-27 15:13:21 -05:00
parent 4c39d2693a
commit 82c987cb15
+4 -4
View File
@@ -48,7 +48,7 @@ def test_bilevel():
expected[::2] = 255
img = imread(os.path.join(data_dir, 'checker_bilevel.png'))
assert_array_equal(img, expected)
np.testing.assert_array_equal(img, expected)
@skipif(not sitk_available)
@@ -56,14 +56,14 @@ def test_imread_uint16():
expected = np.load(os.path.join(data_dir, 'chessboard_GRAY_U8.npy'))
img = imread(os.path.join(data_dir, 'chessboard_GRAY_U16.tif'))
assert np.issubdtype(img.dtype, np.uint16)
assert_array_almost_equal(img, expected)
np.testing.assert_array_almost_equal(img, expected)
@skipif(not sitk_available)
def test_imread_uint16_big_endian():
expected = np.load(os.path.join(data_dir, 'chessboard_GRAY_U8.npy'))
img = imread(os.path.join(data_dir, 'chessboard_GRAY_U16B.tif'))
assert_array_almost_equal(img, expected)
np.testing.assert_array_almost_equal(img, expected)
class TestSave:
@@ -74,7 +74,7 @@ class TestSave:
imsave(fname, x)
y = imread(fname)
assert_array_almost_equal(x, y)
np.testing.assert_array_almost_equal(x, y)
@skipif(not sitk_available)
def test_imsave_roundtrip(self):