Skip to content

Commit ef3407a

Browse files
committed
use filename_to_list from filemanip
1 parent 9dbef42 commit ef3407a

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

nipype/testing/fixtures.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
from io import open
1717
from builtins import str
1818

19+
from nipype.utils.filemanip import filename_to_list
1920
from nipype.interfaces.fsl import Info
2021
from nipype.interfaces.fsl.base import FSLCommand
2122

@@ -30,10 +31,7 @@ def analyze_pair_image_files(outdir, filelist, shape):
3031

3132

3233
def nifti_image_files(outdir, filelist, shape):
33-
if not isinstance(filelist, (list, tuple)):
34-
filelist = [filelist]
35-
36-
for f in filelist:
34+
for f in filename_to_list(filelist):
3735
img = np.random.random(shape)
3836
nb.Nifti1Image(img, np.eye(4), None).to_filename(
3937
os.path.join(outdir, f))

0 commit comments

Comments
 (0)