File tree Expand file tree Collapse file tree 2 files changed +12
-3
lines changed Expand file tree Collapse file tree 2 files changed +12
-3
lines changed Original file line number Diff line number Diff line change 1
1
import numpy as np
2
2
import os
3
3
from os .path import join as pjoin
4
- from numpy .testing import assert_raises
4
+ from numpy .testing import assert_raises , assert_array_equal
5
5
from tempfile import mktemp
6
6
import nibabel as nib
7
7
@@ -34,6 +34,15 @@ def has_freesurfer():
34
34
'Requires FreeSurfer command line tools' )
35
35
36
36
37
+ def test_offscreen ():
38
+ """Test offscreen rendering
39
+ """
40
+ mlab .options .backend = 'auto'
41
+ brain = Brain (* std_args , offscreen = True )
42
+ shot = brain .screenshot ()
43
+ assert_array_equal (shot .shape , (800 , 800 , 3 ))
44
+
45
+
37
46
def test_image ():
38
47
"""Test image saving
39
48
"""
Original file line number Diff line number Diff line change @@ -562,13 +562,13 @@ def toggle_toolbars(self, show=None):
562
562
if hasattr (bars [0 ], 'isVisible' ):
563
563
# QT4
564
564
show = not bars [0 ].isVisible ()
565
- else :
565
+ elif hasattr ( bars [ 0 ], 'Shown' ) :
566
566
# WX
567
567
show = not bars [0 ].Shown ()
568
568
for bar in bars :
569
569
if hasattr (bar , 'setVisible' ):
570
570
bar .setVisible (show )
571
- else :
571
+ elif hasattr ( bar , 'Show' ) :
572
572
bar .Show (show )
573
573
574
574
def _get_one_brain (self , d , name ):
You can’t perform that action at this time.
0 commit comments