File tree 2 files changed +15
-2
lines changed
2 files changed +15
-2
lines changed Original file line number Diff line number Diff line change 1
1
from pathlib import Path
2
+ from nipype import Node
2
3
from nipype .interfaces .afni import Zeropad
3
4
from nipype .testing .fixtures import create_files_in_directory
4
5
@@ -23,3 +24,16 @@ def test_zeropad_handles_outfile_specified_nii_gz(create_files_in_directory):
23
24
24
25
assert (Path (outdir ) / "padded.nii.gz" ).exists ()
25
26
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):
3502
3502
3503
3503
if not isdefined (out_file ):
3504
3504
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