Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
fslpy
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Container Registry
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Michiel Cottaar
fslpy
Commits
f2b731a0
Commit
f2b731a0
authored
8 years ago
by
Paul McCarthy
Browse files
Options
Downloads
Patches
Plain Diff
Some fixes to tests
parent
0cd85d1f
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
tests/test_image.py
+3
-3
3 additions, 3 deletions
tests/test_image.py
tests/test_immv_imcp.py
+3
-1
3 additions, 1 deletion
tests/test_immv_imcp.py
with
6 additions
and
4 deletions
tests/test_image.py
+
3
−
3
View file @
f2b731a0
...
...
@@ -13,7 +13,7 @@ import glob
import
numpy
as
np
import
nibabel
as
nib
from
nibabel.spatialimages
import
HeaderData
Error
from
nibabel.spatialimages
import
ImageFile
Error
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
'
,
HeaderData
Error
),
(
'
notnifti.nii.gz
'
,
HeaderData
Error
)]
(
'
notnifti
'
,
ImageFile
Error
),
(
'
notnifti.nii.gz
'
,
ImageFile
Error
)]
# Not raising an error means the test passes
for
fname
in
shouldPass
:
...
...
This diff is collapsed.
Click to expand it.
tests/test_immv_imcp.py
+
3
−
1
View file @
f2b731a0
...
...
@@ -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
())
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment