@@ -109,16 +109,17 @@ def test_read_ordering():
109
109
assert_equal (img .darrays [0 ].data .shape , (3 ,3 ))
110
110
111
111
112
- def test_metadata ():
112
+ def test_load_metadata ():
113
113
for i , dat in enumerate (datafiles ):
114
114
img = gi .read (dat )
115
115
me = img .meta
116
116
assert_equal (numda [i ], img .numDA )
117
117
assert_equal (img .version ,'1.0' )
118
118
119
119
120
- def test_dataarray1 ():
120
+ def test_load_dataarray1 ():
121
121
img1 = gi .read (DATA_FILE1 )
122
+
122
123
# Round trip
123
124
with InTemporaryDirectory ():
124
125
gi .write (img1 , 'test.gii' )
@@ -135,8 +136,9 @@ def test_dataarray1():
135
136
assert_equal (xform_codes .niistring [img .darrays [0 ].coordsys .xformspace ],'NIFTI_XFORM_TALAIRACH' )
136
137
137
138
138
- def test_dataarray2 ():
139
+ def test_load_dataarray2 ():
139
140
img2 = gi .read (DATA_FILE2 )
141
+
140
142
# Round trip
141
143
with InTemporaryDirectory ():
142
144
gi .write (img2 , 'test.gii' )
@@ -145,17 +147,19 @@ def test_dataarray2():
145
147
assert_array_almost_equal (img .darrays [0 ].data [:10 ], DATA_FILE2_darr1 )
146
148
147
149
148
- def test_dataarray3 ():
150
+ def test_load_dataarray3 ():
149
151
img3 = gi .read (DATA_FILE3 )
152
+
150
153
with InTemporaryDirectory ():
151
154
gi .write (img3 , 'test.gii' )
152
155
bimg = gi .read ('test.gii' )
153
156
for img in (img3 , bimg ):
154
157
assert_array_almost_equal (img .darrays [0 ].data [30 :50 ], DATA_FILE3_darr1 )
155
158
156
159
157
- def test_dataarray4 ():
160
+ def test_load_dataarray4 ():
158
161
img4 = gi .read (DATA_FILE4 )
162
+
159
163
# Round trip
160
164
with InTemporaryDirectory ():
161
165
gi .write (img4 , 'test.gii' )
@@ -166,6 +170,7 @@ def test_dataarray4():
166
170
167
171
def test_dataarray5 ():
168
172
img5 = gi .read (DATA_FILE5 )
173
+
169
174
for da in img5 .darrays :
170
175
assert_equal (gifti_endian_codes .byteorder [da .endian ], 'little' )
171
176
assert_array_almost_equal (img5 .darrays [0 ].data , DATA_FILE5_darr1 )
@@ -212,7 +217,7 @@ def test_readwritedata():
212
217
img2 .darrays [0 ].data )
213
218
214
219
215
- def test_newmetadata ():
220
+ def test_write_newmetadata ():
216
221
img = gi .GiftiImage ()
217
222
attr = gi .GiftiNVPairs (name = 'mykey' , value = 'val1' )
218
223
newmeta = gi .GiftiMetaData (attr )
@@ -226,7 +231,7 @@ def test_newmetadata():
226
231
assert_false ('mykey' in myme )
227
232
228
233
229
- def test_getbyintent ():
234
+ def test_load_getbyintent ():
230
235
img = gi .read (DATA_FILE1 )
231
236
232
237
da = img .get_arrays_from_intent ("NIFTI_INTENT_POINTSET" )
@@ -247,8 +252,9 @@ def test_getbyintent():
247
252
assert_equal (da , [])
248
253
249
254
250
- def test_labeltable ():
255
+ def test_load_labeltable ():
251
256
img6 = gi .read (DATA_FILE6 )
257
+
252
258
# Round trip
253
259
with InTemporaryDirectory ():
254
260
gi .write (img6 , 'test.gii' )
0 commit comments