Skip to content
Snippets Groups Projects
Commit 9bc5629f authored by Paul McCarthy's avatar Paul McCarthy :mountain_bicyclist:
Browse files

TEST: Test fast wrapper

parent e90cfffc
No related branches found
No related tags found
No related merge requests found
......@@ -272,3 +272,18 @@ def test_fslmaths():
assert result.output[0] == expected
# TODO test LOAD output
def test_fast():
with asrt.disabled(), run.dryrun(), mockFSLDIR() as fsldir:
cmd = op.join(fsldir, 'bin', 'fast')
result = fw.fast('input', 'myseg', n_classes=3)
expected = [cmd, '-v', '--out=myseg', '--class=3', 'input']
assert result.output[0] == ' '.join(expected)
result = fw.fast(('in1', 'in2', 'in3'), 'myseg', n_classes=3)
expected = [cmd, '-v', '--out=myseg', '--class=3', 'in1', 'in2', 'in3']
assert result.output[0] == ' '.join(expected)
......@@ -318,14 +318,9 @@ def test_fileOrThing_sequence():
if isinstance(arrs, six.string_types):
arrs = [arrs]
print('Loading from files', arrs)
arrs = [np.loadtxt(a) for a in arrs]
res = np.sum(arrs, axis=0)
print('result', res)
np.savetxt(out, res)
inputs = [np.random.randint(1, 10, (3, 3)) for i in range(4)]
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment