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
Model registry
Operate
Environments
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
FSL
fslpy
Commits
9a2f4904
Commit
9a2f4904
authored
3 years ago
by
Paul McCarthy
Browse files
Options
Downloads
Patches
Plain Diff
TEST: Check Image name/dataSource attributes
parent
ca9022b9
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
tests/test_image.py
+17
-0
17 additions, 0 deletions
tests/test_image.py
with
17 additions
and
0 deletions
tests/test_image.py
+
17
−
0
View file @
9a2f4904
...
@@ -208,6 +208,23 @@ def test_create():
...
@@ -208,6 +208,23 @@ def test_create():
assert
np
.
all
(
np
.
isclose
(
img
.
pixdim
,
(
2
,
3
,
4
)))
assert
np
.
all
(
np
.
isclose
(
img
.
pixdim
,
(
2
,
3
,
4
)))
def
test_name_dataSource
():
with
tempdir
():
expName
=
'
image
'
expDataSource
=
op
.
abspath
(
'
image.nii.gz
'
)
make_image
(
'
image.nii.gz
'
)
tests
=
[
'
image
'
,
'
image.nii.gz
'
,
op
.
abspath
(
'
image
'
),
op
.
abspath
(
'
image.nii.gz
'
)]
tests
=
tests
+
[
Path
(
t
)
for
t
in
tests
]
for
t
in
tests
:
i
=
fslimage
.
Image
(
t
)
assert
i
.
name
==
expName
assert
i
.
dataSource
==
expDataSource
def
test_bad_create
():
def
test_bad_create
():
class
BadThing
(
object
):
class
BadThing
(
object
):
...
...
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