Skip to content

Commit 1389ae7

Browse files
committed
TEST: Fix tests broken in the rebase
1 parent 7a16cf3 commit 1389ae7

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

nibabel/tests/test_minc1.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ def test_old_namespace():
112112
MincImage(arr, aff)
113113
# Another old name
114114
from ..minc1 import MincFile, Minc1File
115-
assert_false(MincFile is Minc1File)
115+
assert MincFile is not Minc1File
116116
with pytest.raises(ExpiredDeprecationError):
117117
mf = MincFile(netcdf_file(EG_FNAME))
118118

nibabel/tests/test_processing.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,8 @@ def test_resample_from_to():
172172
assert out.__class__ == Nifti1Image
173173
# From 2D to 3D, error, the fixed affine is not invertible
174174
img_2d = Nifti1Image(data[:, :, 0], affine)
175-
assert_raises(AffineError, resample_from_to, img_2d, img)
175+
with pytest.raises(AffineError):
176+
resample_from_to(img_2d, img)
176177
# 3D to 2D, we don't need to invert the fixed matrix
177178
out = resample_from_to(img, img_2d)
178179
assert_array_equal(out.dataobj, data[:, :, 0])
@@ -186,7 +187,7 @@ def test_resample_from_to():
186187
assert_almost_equal(data_4d, out.dataobj)
187188
assert_array_equal(img_4d.affine, out.affine)
188189
# Errors trying to match 3D to 4D
189-
with pytest.rises(ValueError):
190+
with pytest.raises(ValueError):
190191
resample_from_to(img_4d, img)
191192
with pytest.raises(ValueError):
192193
resample_from_to(img, img_4d)

nibabel/tests/test_scaling.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ def test_array_file_scales(in_type, out_type, err):
149149
arr[0], arr[1] = info['min'], info['max']
150150
if not err is None:
151151
with pytest.raises(err):
152-
_calculate_scale, arr, out_dtype, True)
152+
_calculate_scale(arr, out_dtype, True)
153153
return
154154
slope, inter, mn, mx = _calculate_scale(arr, out_dtype, True)
155155
array_to_file(arr, bio, out_type, 0, inter, slope, mn, mx)

0 commit comments

Comments
 (0)