Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 0568306

Browse filesBrowse files
committed
Add basic testing of wxagg backend.
wxPython provides Trusty wheels, so use them.
1 parent 99d9eb3 commit 0568306
Copy full SHA for 0568306

File tree

Expand file treeCollapse file tree

2 files changed

+24
-13
lines changed
Filter options
Expand file treeCollapse file tree

2 files changed

+24
-13
lines changed

‎.travis.yml

Copy file name to clipboardExpand all lines: .travis.yml
+16-4Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -123,10 +123,22 @@ 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+
echo 'PyQt5 is available' ||
134+
echo 'PyQt5 is not available'
135+
pip install -U --pre \
136+
-f https://wxpython.org/Phoenix/release-extras/linux/gtk3/ubuntu-14.04 \
137+
wxPython &&
138+
python -c 'import wx' &&
139+
echo 'wxPython is available' ||
140+
echo 'wxPython is not available'
141+
130142
if [[ $BUILD_DOCS == true ]]; then
131143
pip install $PRE -r doc-requirements.txt
132144
fi

‎lib/matplotlib/tests/test_backends_interactive.py

Copy file name to clipboardExpand all lines: lib/matplotlib/tests/test_backends_interactive.py
+8-9Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -20,16 +20,15 @@
2020

2121

2222
def _get_available_backends():
23-
if sys.version_info < (3,):
24-
return []
25-
else:
26-
return [
27-
pytest.mark.skipif(
28-
importlib.util.find_spec(module_name) is None,
29-
reason="Could not import {!r}".format(module_name))(backend)
30-
for module_name, backend in [
23+
return [
24+
pytest.mark.skipif(sys.version_info < (3,)
25+
or importlib.util.find_spec(module_name) is None,
26+
reason="Could not import {!r}".format(module_name))(
27+
backend)
28+
for module_name, backend in [
3129
("PyQt5", "qt5agg"),
32-
("tkinter", "tkagg")]]
30+
("tkinter", "tkagg"),
31+
("wx", "wxagg")]]
3332

3433

3534
_test_script = """\

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.