@@ -108,15 +108,15 @@ def test_compcor_bad_input_shapes(self):
108108 data_file = utils .save_toy_nii (np .zeros (data_shape ), 'temp.nii' )
109109 interface = CompCor (
110110 realigned_file = data_file , mask_files = self .mask_files [0 ])
111- with pytest .raises (ValueError , message = "Dimension mismatch" ):
112- interface .run ()
111+ with pytest .raises (ValueError ):
112+ interface .run () # Dimension mismatch
113113
114114 def test_tcompcor_bad_input_dim (self ):
115115 bad_dims = (2 , 2 , 2 )
116116 data_file = utils .save_toy_nii (np .zeros (bad_dims ), 'temp.nii' )
117117 interface = TCompCor (realigned_file = data_file )
118- with pytest .raises (ValueError , message = 'Not a 4D file' ):
119- interface .run ()
118+ with pytest .raises (ValueError ):
119+ interface .run () # Not a 4D file
120120
121121 def test_tcompcor_merge_intersect_masks (self ):
122122 for method in ['union' , 'intersect' ]:
@@ -145,8 +145,8 @@ def test_tcompcor_index_mask(self):
145145 def test_tcompcor_multi_mask_no_index (self ):
146146 interface = TCompCor (
147147 realigned_file = self .realigned_file , mask_files = self .mask_files )
148- with pytest .raises (ValueError , message = 'more than one mask file' ):
149- interface .run ()
148+ with pytest .raises (ValueError ):
149+ interface .run () # more than one mask file
150150
151151 def run_cc (self ,
152152 ccinterface ,
0 commit comments