Skip to content

Commit 11ac269

Browse files
committed
FIX: Adding offscreen test
1 parent ccf97b8 commit 11ac269

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

surfer/tests/test_viz.py

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import numpy as np
22
import os
33
from os.path import join as pjoin
4-
from numpy.testing import assert_raises
4+
from numpy.testing import assert_raises, assert_array_equal
55
from tempfile import mktemp
66
import nibabel as nib
77

@@ -34,6 +34,15 @@ def has_freesurfer():
3434
'Requires FreeSurfer command line tools')
3535

3636

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+
3746
def test_image():
3847
"""Test image saving
3948
"""

0 commit comments

Comments
 (0)