@@ -22,14 +22,12 @@ class TestTSNR(unittest.TestCase):
22
22
'in_file' : 'tsnrinfile.nii' ,
23
23
}
24
24
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 ()}
25
+ out_filenames = {# default output file names
26
+ 'detrended_file' : 'detrend.nii.gz' ,
27
+ 'mean_file' : 'mean.nii.gz' ,
28
+ 'stddev_file' : 'stdev.nii.gz' ,
29
+ 'tsnr_file' : 'tsnr.nii.gz'
30
+ }
33
31
34
32
def setUp (self ):
35
33
# setup
@@ -86,7 +84,7 @@ def test_tsnr_withpoly3(self):
86
84
})
87
85
88
86
def assert_expected_outputs_poly (self , tsnrresult , hash_dict ):
89
- assert_equal (os .path .abspath (tsnrresult .outputs .detrended_file ),
87
+ assert_equal (os .path .basename (tsnrresult .outputs .detrended_file ),
90
88
self .out_filenames ['detrended_file' ])
91
89
self .assert_expected_outputs (tsnrresult , hash_dict )
92
90
@@ -95,11 +93,11 @@ def assert_expected_outputs(self, tsnrresult, hash_dict):
95
93
self .assert_unchanged (hash_dict )
96
94
97
95
def assert_default_outputs (self , outputs ):
98
- assert_equal (os .path .abspath (outputs .mean_file ),
96
+ assert_equal (os .path .basename (outputs .mean_file ),
99
97
self .out_filenames ['mean_file' ])
100
- assert_equal (os .path .abspath (outputs .stddev_file ),
98
+ assert_equal (os .path .basename (outputs .stddev_file ),
101
99
self .out_filenames ['stddev_file' ])
102
- assert_equal (os .path .abspath (outputs .tsnr_file ),
100
+ assert_equal (os .path .basename (outputs .tsnr_file ),
103
101
self .out_filenames ['tsnr_file' ])
104
102
105
103
def assert_unchanged (self , expected_hashes ):
0 commit comments