Commit 9a2f4904 authored by Paul McCarthy's avatar Paul McCarthy 🚵
Browse files

TEST: Check Image name/dataSource attributes

parent ca9022b9
......@@ -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')
tests = ['image', 'image.nii.gz', op.abspath('image'),
tests = tests + [Path(t) for t in tests]
for t in tests:
i = fslimage.Image(t)
assert == expName
assert i.dataSource == expDataSource
def test_bad_create():
class BadThing(object):
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment