Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit a2664e0

Browse files
committed
Add basic testing of wxagg backend.
wxPython provides Trusty wheels, so use them.
1 parent 99d9eb3 commit a2664e0

File tree

2 files changed

+16
-5
lines changed

2 files changed

+16
-5
lines changed

.travis.yml

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -123,10 +123,20 @@ install:
123123
pyparsing!=2.1.6 \
124124
python-dateutil \
125125
sphinx
126-
# GUI toolkits are pip-installable only for some versions of Python so don't
127-
# fail if we can't install them.
128-
pip install pyqt5 || true
129-
python -c 'import PyQt5.QtCore' || true
126+
# GUI toolkits are pip-installable only for some versions of Python so
127+
# don't fail if we can't install them. Make it easier to check whether the
128+
# install was successful by trying to import the toolkit (sometimes, the
129+
# install appears to be successful but shared libraries cannot be loaded at
130+
# runtime, so an actual import is a better check).
131+
pip install pyqt5 &&
132+
python -c 'import PyQt5.QtCore' ||
133+
true
134+
pip install -U --pre \
135+
-f https://wxpython.org/Phoenix/release-extras/linux/gtk3/ubuntu-14.04 \
136+
wxPython &&
137+
python -c 'import wx' ||
138+
true
139+
130140
if [[ $BUILD_DOCS == true ]]; then
131141
pip install $PRE -r doc-requirements.txt
132142
fi

lib/matplotlib/tests/test_backends_interactive.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,8 @@ def _get_available_backends():
2929
reason="Could not import {!r}".format(module_name))(backend)
3030
for module_name, backend in [
3131
("PyQt5", "qt5agg"),
32-
("tkinter", "tkagg")]]
32+
("tkinter", "tkagg"),
33+
("wx", "wxagg")]]
3334

3435

3536
_test_script = """\

0 commit comments

Comments
 (0)