Skip to content
Snippets Groups Projects
Commit f2b731a0 authored by Paul McCarthy's avatar Paul McCarthy
Browse files

Some fixes to tests

parent 0cd85d1f
No related branches found
No related tags found
No related merge requests found
......@@ -13,7 +13,7 @@ import glob
import numpy as np
import nibabel as nib
from nibabel.spatialimages import HeaderDataError
from nibabel.spatialimages import ImageFileError
import fsl.data.constants as constants
import fsl.data.image as fslimage
......@@ -49,8 +49,8 @@ def test_load(testdir):
shouldRaise = [('notexist', fslpath.PathError),
('notexist.nii.gz', fslpath.PathError),
('ambiguous', fslpath.PathError),
('notnifti', HeaderDataError),
('notnifti.nii.gz', HeaderDataError)]
('notnifti', ImageFileError),
('notnifti.nii.gz', ImageFileError)]
# Not raising an error means the test passes
for fname in shouldPass:
......
......@@ -16,6 +16,8 @@ import tempfile
import numpy as np
import nibabel as nib
from nibabel.spatialimages import ImageFileError
import pytest
import fsl.utils.path as fslpath
......@@ -454,7 +456,7 @@ def test_imcp_script_shouldFail(move=False):
if move: immv_script.main(imcp_args)
else: imcp_script.main(imcp_args)
assert False
except (RuntimeError, IOError, fslpath.PathError):
except (RuntimeError, IOError, fslpath.PathError, ImageFileError):
pass
sp.call('chmod u+rwx {}'.format(indir) .split())
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment