Skip to content

Commit 532cc34

Browse files
committed
BF: make MPL viewer tests require MPL 1.3
Viewer tests giving errors on very old MPL: see http://nipy.bic.berkeley.edu/builders/nibabel-py2.x-sid-sparc/builds/129/steps/shell_5/logs/stdio
1 parent 4d2404d commit 532cc34

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

nibabel/tests/test_viewers.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@
77
#
88
### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ##
99

10-
import numpy as np
1110
from collections import namedtuple as nt
1211

12+
import numpy as np
1313

1414
from ..optpkg import optional_package
1515
from ..viewers import OrthoSlicer3D
@@ -19,7 +19,9 @@
1919

2020
from nose.tools import assert_raises, assert_true
2121

22-
matplotlib, has_mpl = optional_package('matplotlib')[:2]
22+
# Need at least MPL 1.3 for viewer tests.
23+
matplotlib, has_mpl, _ = optional_package('matplotlib', min_version='1.3')
24+
2325
needs_mpl = skipif(not has_mpl, 'These tests need matplotlib')
2426
if has_mpl:
2527
matplotlib.use('Agg')

0 commit comments

Comments
 (0)