File tree Expand file tree Collapse file tree 2 files changed +12
-6
lines changed Expand file tree Collapse file tree 2 files changed +12
-6
lines changed Original file line number Diff line number Diff line change @@ -452,7 +452,7 @@ def add_gifti_data_array(self, dataarr):
452452 dataarr : GiftiDataArray
453453 """
454454 if not isinstance (dataarr , GiftiDataArray ):
455- raise TypeError ("dataarr paramater must be of type GiftiDataArray" )
455+ raise TypeError ("Not a valid GiftiDataArray instance " )
456456 self .darrays .append (dataarr )
457457
458458 def remove_gifti_data_array (self , ith ):
Original file line number Diff line number Diff line change @@ -80,11 +80,6 @@ def test_labeltable():
8080 img .labeltable = new_table
8181 assert_equal (len (img .labeltable .labels ), 2 )
8282
83- # Try to set to non-table
84- def assign_labeltable (val ):
85- img .labeltable = val
86- assert_raises (TypeError , assign_labeltable , 'not-a-table' )
87-
8883
8984def test_metadata ():
9085 # Test deprecation
@@ -156,4 +151,15 @@ def test_gifti_image():
156151 assert_true (img .meta is not None )
157152 assert_true (img .labeltable is not None )
158153
154+ # Try to set a non-data-array
159155 assert_raises (TypeError , img .add_gifti_data_array , 'not-a-data-array' )
156+
157+ # Try to set to non-table
158+ def assign_labeltable (val ):
159+ img .labeltable = val
160+ assert_raises (TypeError , assign_labeltable , 'not-a-table' )
161+
162+ # Try to set to non-table
163+ def assign_metadata (val ):
164+ img .meta = val
165+ assert_raises (TypeError , assign_metadata , 'not-a-meta' )
You can’t perform that action at this time.
0 commit comments