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):
452
452
dataarr : GiftiDataArray
453
453
"""
454
454
if not isinstance (dataarr , GiftiDataArray ):
455
- raise TypeError ("dataarr paramater must be of type GiftiDataArray" )
455
+ raise TypeError ("Not a valid GiftiDataArray instance " )
456
456
self .darrays .append (dataarr )
457
457
458
458
def remove_gifti_data_array (self , ith ):
Original file line number Diff line number Diff line change @@ -80,11 +80,6 @@ def test_labeltable():
80
80
img .labeltable = new_table
81
81
assert_equal (len (img .labeltable .labels ), 2 )
82
82
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
-
88
83
89
84
def test_metadata ():
90
85
# Test deprecation
@@ -156,4 +151,15 @@ def test_gifti_image():
156
151
assert_true (img .meta is not None )
157
152
assert_true (img .labeltable is not None )
158
153
154
+ # Try to set a non-data-array
159
155
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