@@ -33,8 +33,7 @@ def has_freesurfer():
33
33
34
34
@requires_fsaverage
35
35
def test_offscreen ():
36
- """Test offscreen rendering
37
- """
36
+ """Test offscreen rendering."""
38
37
mlab .options .backend = 'auto'
39
38
brain = Brain (* std_args , offscreen = True )
40
39
# Sometimes the first screenshot is rendered with a different
@@ -47,8 +46,7 @@ def test_offscreen():
47
46
48
47
@requires_fsaverage
49
48
def test_image ():
50
- """Test image saving
51
- """
49
+ """Test image saving."""
52
50
tmp_name = mktemp () + '.png'
53
51
54
52
mlab .options .backend = 'auto'
@@ -68,8 +66,7 @@ def test_image():
68
66
69
67
@requires_fsaverage
70
68
def test_brains ():
71
- """Test plotting of Brain with different arguments
72
- """
69
+ """Test plotting of Brain with different arguments."""
73
70
# testing backend breaks when passing in a figure, so we use 'auto' here
74
71
# (shouldn't affect usability, but it makes testing more annoying)
75
72
mlab .options .backend = 'auto'
@@ -102,8 +99,7 @@ def test_brains():
102
99
103
100
@requires_fsaverage
104
101
def test_annot ():
105
- """Test plotting of annot
106
- """
102
+ """Test plotting of annot."""
107
103
mlab .options .backend = 'test'
108
104
annots = ['aparc' , 'aparc.a2005s' ]
109
105
borders = [True , False , 2 ]
@@ -117,8 +113,7 @@ def test_annot():
117
113
118
114
@requires_fsaverage
119
115
def test_contour ():
120
- """Test plotting of contour overlay
121
- """
116
+ """Test plotting of contour overlay."""
122
117
mlab .options .backend = 'test'
123
118
brain = Brain (* std_args )
124
119
overlay_file = pjoin (data_dir , "lh.sig.nii.gz" )
@@ -133,21 +128,20 @@ def test_contour():
133
128
@requires_fsaverage
134
129
@requires_fs
135
130
def test_data ():
136
- """Test plotting of data
137
- """
131
+ """Test plotting of data."""
138
132
mlab .options .backend = 'test'
139
133
brain = Brain (* std_args )
140
134
mri_file = pjoin (data_dir , 'resting_corr.nii.gz' )
141
135
reg_file = pjoin (data_dir , 'register.dat' )
142
136
surf_data = io .project_volume_data (mri_file , "lh" , reg_file )
143
137
brain .add_data (surf_data , - .7 , .7 , colormap = "jet" , alpha = .7 )
138
+ brain .add_data ([], vertices = np .array ([], int ))
144
139
brain .close ()
145
140
146
141
147
142
@requires_fsaverage
148
143
def test_foci ():
149
- """Test plotting of foci
150
- """
144
+ """Test plotting of foci."""
151
145
mlab .options .backend = 'test'
152
146
brain = Brain (* std_args )
153
147
coords = [[- 36 , 18 , - 3 ],
@@ -167,8 +161,7 @@ def test_foci():
167
161
168
162
@requires_fsaverage
169
163
def test_label ():
170
- """Test plotting of label
171
- """
164
+ """Test plotting of label."""
172
165
mlab .options .backend = 'test'
173
166
subject_id = "fsaverage"
174
167
hemi = "lh"
@@ -190,8 +183,7 @@ def test_label():
190
183
191
184
@requires_fsaverage
192
185
def test_meg_inverse ():
193
- """Test plotting of MEG inverse solution
194
- """
186
+ """Test plotting of MEG inverse solution."""
195
187
mlab .options .backend = 'test'
196
188
brain = Brain (* std_args )
197
189
stc_fname = os .path .join (data_dir , 'meg_source_estimate-lh.stc' )
@@ -223,8 +215,7 @@ def time_label(t):
223
215
224
216
@requires_fsaverage
225
217
def test_morphometry ():
226
- """Test plotting of morphometry
227
- """
218
+ """Test plotting of morphometry."""
228
219
mlab .options .backend = 'test'
229
220
brain = Brain (* std_args )
230
221
brain .add_morphometry ("curv" )
@@ -236,8 +227,7 @@ def test_morphometry():
236
227
@requires_imageio
237
228
@requires_fsaverage
238
229
def test_movie ():
239
- """Test saving a movie of an MEG inverse solution
240
- """
230
+ """Test saving a movie of an MEG inverse solution."""
241
231
import imageio
242
232
243
233
# create and setup the Brain instance
@@ -273,8 +263,7 @@ def test_movie():
273
263
274
264
@requires_fsaverage
275
265
def test_overlay ():
276
- """Test plotting of overlay
277
- """
266
+ """Test plotting of overlay."""
278
267
mlab .options .backend = 'test'
279
268
# basic overlay support
280
269
overlay_file = pjoin (data_dir , "lh.sig.nii.gz" )
@@ -306,8 +295,7 @@ def test_overlay():
306
295
307
296
@requires_fsaverage
308
297
def test_probabilistic_labels ():
309
- """Test plotting of probabilistic labels
310
- """
298
+ """Test plotting of probabilistic labels."""
311
299
mlab .options .backend = 'test'
312
300
brain = Brain ("fsaverage" , "lh" , "inflated" ,
313
301
cortex = "low_contrast" )
@@ -332,8 +320,7 @@ def test_probabilistic_labels():
332
320
333
321
@requires_fsaverage
334
322
def test_text ():
335
- """Test plotting of text
336
- """
323
+ """Test plotting of text."""
337
324
mlab .options .backend = 'test'
338
325
brain = Brain (* std_args )
339
326
brain .add_text (0.1 , 0.1 , 'Hello' , 'blah' )
@@ -342,8 +329,7 @@ def test_text():
342
329
343
330
@requires_fsaverage
344
331
def test_animate ():
345
- """Test animation
346
- """
332
+ """Test animation."""
347
333
mlab .options .backend = 'auto'
348
334
brain = Brain (* std_args , size = 100 )
349
335
brain .add_morphometry ('curv' )
@@ -357,8 +343,7 @@ def test_animate():
357
343
358
344
@requires_fsaverage
359
345
def test_views ():
360
- """Test showing different views
361
- """
346
+ """Test showing different views."""
362
347
mlab .options .backend = 'test'
363
348
brain = Brain (* std_args )
364
349
brain .show_view ('lateral' )
0 commit comments