diff --git a/tests/test_ensure.py b/tests/test_ensure.py index dabd3a952f22e037d202d251c5c6d18c14a2fe31..865c205bb1c2396e41072c674ea7f688871f5de5 100644 --- a/tests/test_ensure.py +++ b/tests/test_ensure.py @@ -22,7 +22,9 @@ def test_ensureIsImage(): assert ensure.ensureIsImage(img) is img - loaded = ensure.ensureIsImage('image.nii') + loaded = [ensure.ensureIsImage('image.nii'), + ensure.ensureIsImage('image')] - assert isinstance(loaded, nib.nifti1.Nifti1Image) - assert np.all(img.get_data() == loaded.get_data()) + for l in loaded: + assert isinstance(l, nib.nifti1.Nifti1Image) + assert np.all(img.get_data() == l.get_data())