Skip to content

Commit 9491806

Browse files
committed
add non-3d tests
1 parent 348f838 commit 9491806

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

nibabel/tests/test_processing.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -445,9 +445,12 @@ def test_conform():
445445
assert isinstance(c, Nifti2Image)
446446

447447
# Error on non-3D arguments.
448-
assert_raises(ValueError, conform, anat, out_shape=(100, 100))
449-
assert_raises(ValueError, conform, anat, voxel_size=(2, 2))
448+
with pytest.raises(ValueError):
449+
conform(anat, out_shape=(100, 100))
450+
with pytest.raises(ValueError):
451+
conform(anat, voxel_size=(2, 2))
450452

451453
# Error on non-3D images.
452454
func = nib.load(pjoin(DATA_DIR, 'functional.nii'))
453-
assert_raises(ValueError, conform, func)
455+
with pytest.raises(ValueError):
456+
conform(func)

0 commit comments

Comments
 (0)