@@ -227,6 +227,14 @@ def test_flirt(setup_flirt):
227
227
flirter .cmdline
228
228
flirter .inputs .reference = reffile
229
229
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
+
230
238
# test apply_xfm option
231
239
axfm = flirter
232
240
axfm .inputs .apply_xfm = True
@@ -235,20 +243,11 @@ def test_flirt(setup_flirt):
235
243
axfm2 = axfm
236
244
# test uses_qform
237
245
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' )
240
247
# test in_matrix_file
241
248
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 )
244
250
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
252
251
253
252
_ , tmpfile = tempfile .mkstemp (suffix = '.nii' , dir = tmpdir )
254
253
# Loop over all inputs, set a reasonable value and make sure the
0 commit comments