Skip to content

Commit 2be737d

Browse files
committed
fix: missing args in test cmdline
1 parent 0de0296 commit 2be737d

File tree

1 file changed

+10
-11
lines changed

1 file changed

+10
-11
lines changed

nipype/interfaces/fsl/tests/test_preprocess.py

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -227,6 +227,14 @@ def test_flirt(setup_flirt):
227227
flirter.cmdline
228228
flirter.inputs.reference = reffile
229229

230+
# Generate outfile and outmatrix
231+
pth, fname, ext = split_filename(infile)
232+
outfile = fsl_name(flirter, '%s_flirt' % fname)
233+
outmat = '%s_flirt.mat' % fname
234+
realcmd = 'flirt -in %s -ref %s -out %s -omat %s' % (infile, reffile,
235+
outfile, outmat)
236+
assert flirter.cmdline == realcmd
237+
230238
# test apply_xfm option
231239
axfm = flirter
232240
axfm.inputs.apply_xfm = True
@@ -235,20 +243,11 @@ def test_flirt(setup_flirt):
235243
axfm2 = axfm
236244
# test uses_qform
237245
axfm.inputs.uses_qform = True
238-
assert axfm.cmdline == ('flirt -in %s -ref %s -applyxfm -usesqform' % (
239-
infile, reffile))
246+
assert axfm.cmdline == (realcmd += ' -applyxfm -usesqform')
240247
# test in_matrix_file
241248
axfm2.inputs.in_matrix_file = reffile
242-
assert axfm2.cmdline == ('flirt -in %s -ref %s -applyxfm -init %s' % (
243-
infile, reffile, reffile))
249+
assert axfm2.cmdline == (realcmd += ' -applyxfm -init %s' % reffile)
244250

245-
# Generate outfile and outmatrix
246-
pth, fname, ext = split_filename(infile)
247-
outfile = fsl_name(flirter, '%s_flirt' % fname)
248-
outmat = '%s_flirt.mat' % fname
249-
realcmd = 'flirt -in %s -ref %s -out %s -omat %s' % (infile, reffile,
250-
outfile, outmat)
251-
assert flirter.cmdline == realcmd
252251

253252
_, tmpfile = tempfile.mkstemp(suffix='.nii', dir=tmpdir)
254253
# Loop over all inputs, set a reasonable value and make sure the

0 commit comments

Comments
 (0)