Commit 9e580c23 authored by William Clarke's avatar William Clarke
Browse files

Fix bug, add tests.

parent ed7f68f2
......@@ -397,7 +397,7 @@ def main():
def str_or_int_arg(x):
try:
return int(x)
except TypeError:
except ValueError:
return x
......
......@@ -8,7 +8,8 @@ import os.path as op
testsPath = op.dirname(__file__)
data = {'metab': op.join(testsPath, 'testdata/fsl_mrs/metab.nii'),
'water': op.join(testsPath, 'testdata/fsl_mrs/water.nii'),
'basis': op.join(testsPath, 'testdata/fsl_mrs/steam_basis')}
'basis': op.join(testsPath, 'testdata/fsl_mrs/steam_basis'),
'seg': op.join(testsPath, 'testdata/fsl_mrs/segmentation.json')}
def test_fsl_mrs(tmp_path):
......@@ -19,8 +20,20 @@ def test_fsl_mrs(tmp_path):
'--output', tmp_path,
'--h2o', data['water'],
'--TE', '11',
'--metab_groups', 'Mac',
'--tissue_frac', '0.45', '0.45', '0.1',
'--overwrite',
'--combine', 'Cr', 'PCr'])
subprocess.check_call(['fsl_mrs',
'--data', data['metab'],
'--basis', data['basis'],
'--output', tmp_path,
'--h2o', data['water'],
'--TE', '11',
'--metab_groups', 'Mac',
'--tissue_frac', data['seg'],
'--overwrite',
'--combine', 'Cr', 'PCr',
'--report'])
......
This source diff could not be displayed because it is stored in LFS. You can view the blob instead.
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