@@ -140,17 +140,17 @@ def test_cifti2_label():
140140 lb .label = 'Test'
141141 lb .key = 0
142142 assert lb .rgba == (0 , 0 , 0 , 0 )
143- assert compare_xml_leaf (lb .to_xml ().decode ('utf-8' ), "<Label Key='0' Red='0' Green='0' Blue='0' Alpha='0'>Test</Label>" )
143+ assert compare_xml_leaf (lb .to_xml ().decode ('utf-8' ),
144+ "<Label Key='0' Red='0' Green='0' Blue='0' Alpha='0'>Test</Label>" )
144145
145146 lb .red = 0
146147 lb .green = 0.1
147148 lb .blue = 0.2
148149 lb .alpha = 0.3
149150 assert lb .rgba == (0 , 0.1 , 0.2 , 0.3 )
150151
151- assert compare_xml_leaf (
152- lb .to_xml ().decode ('utf-8' ),
153- "<Label Key='0' Red='0' Green='0.1' Blue='0.2' Alpha='0.3'>Test</Label>" )
152+ assert compare_xml_leaf (lb .to_xml ().decode ('utf-8' ),
153+ "<Label Key='0' Red='0' Green='0.1' Blue='0.2' Alpha='0.3'>Test</Label>" )
154154
155155 lb .red = 10
156156 with pytest .raises (ci .Cifti2HeaderError ):
@@ -172,7 +172,7 @@ def test_cifti2_parcel():
172172 pl .append_cifti_vertices (None )
173173
174174 with pytest .raises (ValueError ):
175- ci .Cifti2Parcel (** { ' vertices' : [1 , 2 , 3 ]} )
175+ ci .Cifti2Parcel (vertices = [1 , 2 , 3 ])
176176
177177 pl = ci .Cifti2Parcel (name = 'region' ,
178178 voxel_indices_ijk = ci .Cifti2VoxelIndicesIJK ([[1 , 2 , 3 ]]),
@@ -296,10 +296,10 @@ def test_cifti2_voxelindicesijk():
296296 # Don't know how to use remove with slice
297297 del vi [:, 0 ]
298298 with pytest .raises (ValueError ):
299- vi [( 0 , 0 , 0 ) ]
299+ vi [0 , 0 , 0 ]
300300
301301 with pytest .raises (ValueError ):
302- vi [( 0 , 0 , 0 ) ] = 0
302+ vi [0 , 0 , 0 ] = 0
303303
304304 assert vi .to_xml ().decode ('utf-8' ) == '<VoxelIndicesIJK>0 1 2\n 3 4 6</VoxelIndicesIJK>'
305305
@@ -334,22 +334,22 @@ def test_matrixindicesmap():
334334 del mim .volume
335335 assert mim .volume is None
336336 with pytest .raises (ValueError ):
337- delattr ( mim , ' volume' )
337+ del mim . volume
338338
339339 mim .volume = volume
340340 assert mim .volume == volume
341341 mim .volume = volume2
342342 assert mim .volume == volume2
343343
344344 with pytest .raises (ValueError ):
345- setattr ( mim , ' volume' , parcel )
345+ mim . volume = parcel
346346
347347
348348def test_matrix ():
349349 m = ci .Cifti2Matrix ()
350350
351- with pytest .raises (TypeError ):
352- m ( setattr , ' metadata' , ci .Cifti2Parcel () )
351+ with pytest .raises (ValueError ):
352+ m . metadata = ci .Cifti2Parcel ()
353353
354354 with pytest .raises (TypeError ):
355355 m [0 ] = ci .Cifti2Parcel ()
0 commit comments