Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
FSL
fslpy
Commits
9a2f4904
Commit
9a2f4904
authored
Apr 16, 2021
by
Paul McCarthy
🚵
Browse files
TEST: Check Image name/dataSource attributes
parent
ca9022b9
Changes
1
Hide whitespace changes
Inline
Side-by-side
tests/test_image.py
View file @
9a2f4904
...
...
@@ -208,6 +208,23 @@ def test_create():
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
():
class
BadThing
(
object
):
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment