@@ -22,13 +22,14 @@ class TestTSNR(unittest.TestCase):
22
22
'in_file' : 'tsnrinfile.nii' ,
23
23
}
24
24
25
- out_filenames = {
26
- # default output file names
27
- 'detrended_file' : '/home/ubuntu/nipype/detrend.nii.gz' ,
28
- 'mean_file' : '/home/ubuntu/nipype/mean.nii.gz' ,
29
- 'stddev_file' : '/home/ubuntu/nipype/stdev.nii.gz' ,
30
- 'tsnr_file' : '/home/ubuntu/nipype/tsnr.nii.gz'
31
- }
25
+ out_filenames = {key : os .path .abspath (filename ) for key , filename in
26
+ {
27
+ # default output file names
28
+ 'detrended_file' : 'detrend.nii.gz' ,
29
+ 'mean_file' : 'mean.nii.gz' ,
30
+ 'stddev_file' : 'stdev.nii.gz' ,
31
+ 'tsnr_file' : 'tsnr.nii.gz'
32
+ }.items ()}
32
33
33
34
def setUp (self ):
34
35
# setup
@@ -85,7 +86,7 @@ def test_tsnr_withpoly3(self):
85
86
})
86
87
87
88
def assert_expected_outputs_poly (self , tsnrresult , hash_dict ):
88
- assert_equal (tsnrresult .outputs .detrended_file ,
89
+ assert_equal (os . path . abspath ( tsnrresult .outputs .detrended_file ) ,
89
90
self .out_filenames ['detrended_file' ])
90
91
self .assert_expected_outputs (tsnrresult , hash_dict )
91
92
@@ -94,9 +95,12 @@ def assert_expected_outputs(self, tsnrresult, hash_dict):
94
95
self .assert_unchanged (hash_dict )
95
96
96
97
def assert_default_outputs (self , outputs ):
97
- assert_equal (outputs .mean_file , self .out_filenames ['mean_file' ])
98
- assert_equal (outputs .stddev_file , self .out_filenames ['stddev_file' ])
99
- assert_equal (outputs .tsnr_file , self .out_filenames ['tsnr_file' ])
98
+ assert_equal (os .path .abspath (outputs .mean_file ),
99
+ self .out_filenames ['mean_file' ])
100
+ assert_equal (os .path .abspath (outputs .stddev_file ),
101
+ self .out_filenames ['stddev_file' ])
102
+ assert_equal (os .path .abspath (outputs .tsnr_file ),
103
+ self .out_filenames ['tsnr_file' ])
100
104
101
105
def assert_unchanged (self , expected_hashes ):
102
106
for key , hexhash in expected_hashes .iteritems ():
0 commit comments