Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
fslpy
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Analyze
Contributor analytics
CI/CD 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
Evan Edmond
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
...
@@ -13,7 +13,7 @@ import glob
import
numpy
as
np
import
numpy
as
np
import
nibabel
as
nib
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.constants
as
constants
import
fsl.data.image
as
fslimage
import
fsl.data.image
as
fslimage
...
@@ -49,8 +49,8 @@ def test_load(testdir):
...
@@ -49,8 +49,8 @@ def test_load(testdir):
shouldRaise
=
[(
'
notexist
'
,
fslpath
.
PathError
),
shouldRaise
=
[(
'
notexist
'
,
fslpath
.
PathError
),
(
'
notexist.nii.gz
'
,
fslpath
.
PathError
),
(
'
notexist.nii.gz
'
,
fslpath
.
PathError
),
(
'
ambiguous
'
,
fslpath
.
PathError
),
(
'
ambiguous
'
,
fslpath
.
PathError
),
(
'
notnifti
'
,
HeaderData
Error
),
(
'
notnifti
'
,
ImageFile
Error
),
(
'
notnifti.nii.gz
'
,
HeaderData
Error
)]
(
'
notnifti.nii.gz
'
,
ImageFile
Error
)]
# Not raising an error means the test passes
# Not raising an error means the test passes
for
fname
in
shouldPass
:
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
...
@@ -16,6 +16,8 @@ import tempfile
import
numpy
as
np
import
numpy
as
np
import
nibabel
as
nib
import
nibabel
as
nib
from
nibabel.spatialimages
import
ImageFileError
import
pytest
import
pytest
import
fsl.utils.path
as
fslpath
import
fsl.utils.path
as
fslpath
...
@@ -454,7 +456,7 @@ def test_imcp_script_shouldFail(move=False):
...
@@ -454,7 +456,7 @@ def test_imcp_script_shouldFail(move=False):
if
move
:
immv_script
.
main
(
imcp_args
)
if
move
:
immv_script
.
main
(
imcp_args
)
else
:
imcp_script
.
main
(
imcp_args
)
else
:
imcp_script
.
main
(
imcp_args
)
assert
False
assert
False
except
(
RuntimeError
,
IOError
,
fslpath
.
PathError
):
except
(
RuntimeError
,
IOError
,
fslpath
.
PathError
,
ImageFileError
):
pass
pass
sp
.
call
(
'
chmod u+rwx {}
'
.
format
(
indir
)
.
split
())
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