File tree Expand file tree Collapse file tree 2 files changed +15
-2
lines changed Expand file tree Collapse file tree 2 files changed +15
-2
lines changed Original file line number Diff line number Diff line change 11from pathlib import Path
2+ from nipype import Node
23from nipype .interfaces .afni import Zeropad
34from nipype .testing .fixtures import create_files_in_directory
45
@@ -23,3 +24,16 @@ def test_zeropad_handles_outfile_specified_nii_gz(create_files_in_directory):
2324
2425 assert (Path (outdir ) / "padded.nii.gz" ).exists ()
2526 assert Path (result .outputs .out_file ).name == "padded.nii.gz"
27+
28+
29+ def test_zeropad_keeps_file_after_node_run (create_files_in_directory ):
30+ filelist , outdir = create_files_in_directory
31+
32+ zp = Node (
33+ Zeropad (I = 1 , out_file = "padded.nii.gz" ), name = "test_zeropad" , base_dir = outdir
34+ )
35+ zp .inputs .in_files = Path (outdir ) / filelist [0 ]
36+
37+ result = zp .run ()
38+ assert (Path (zp .output_dir ()) / "padded.nii.gz" ).exists ()
39+ assert Path (result .outputs .out_file ).name == "padded.nii.gz"
Original file line number Diff line number Diff line change @@ -3502,5 +3502,4 @@ def _list_outputs(self):
35023502
35033503 if not isdefined (out_file ):
35043504 out_file = "zeropad+tlrc.BRIK"
3505-
3506- return {"out_file" : out_file }
3505+ return {"out_file" : op .abspath (out_file )}
You can’t perform that action at this time.
0 commit comments