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
Christoph Arthofer
fslpy
Commits
f92d16b8
Commit
f92d16b8
authored
Feb 04, 2020
by
Paul McCarthy
🚵
Browse files
TEST: regression
parent
922edb83
Changes
1
Hide whitespace changes
Inline
Side-by-side
tests/test_image.py
View file @
f92d16b8
...
...
@@ -1401,6 +1401,25 @@ def test_loadMeta():
assert
img
.
getMeta
(
'b'
)
==
2
def
test_loadMeta_nonBids
():
with
tempdir
():
# non-bids file in a BIDS-like directory
imgfile
=
op
.
join
(
'data'
,
'sub-01'
,
'anat'
,
'sub-01_T1w_nonbids.nii.gz'
)
os
.
makedirs
(
op
.
dirname
(
imgfile
))
make_image
(
imgfile
)
with
open
(
op
.
join
(
'data'
,
'dataset_description.json'
),
'wt'
)
as
f
:
pass
img
=
fslimage
.
Image
(
imgfile
,
loadMeta
=
True
)
assert
list
(
img
.
metaKeys
())
==
[]
def
test_loadMetadata
():
with
tempdir
():
make_image
(
'image.nii.gz'
)
...
...
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