Skip to content

Commit

Permalink
Merge pull request matplotlib#8676 from anntzer/wxagg-basic-test
Browse files Browse the repository at this point in the history
Add basic testing of wxagg backend.
  • Loading branch information
dstansby authored May 29, 2017
2 parents 8d40dce + 0568306 commit 9b9c24c
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 13 deletions.
20 changes: 16 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -123,10 +123,22 @@ install:
pyparsing!=2.1.6 \
python-dateutil \
sphinx
# GUI toolkits are pip-installable only for some versions of Python so don't
# fail if we can't install them.
pip install pyqt5 || true
python -c 'import PyQt5.QtCore' || true
# GUI toolkits are pip-installable only for some versions of Python so
# don't fail if we can't install them. Make it easier to check whether the
# install was successful by trying to import the toolkit (sometimes, the
# install appears to be successful but shared libraries cannot be loaded at
# runtime, so an actual import is a better check).
pip install pyqt5 &&
python -c 'import PyQt5.QtCore' &&
echo 'PyQt5 is available' ||
echo 'PyQt5 is not available'
pip install -U --pre \
-f https://wxpython.org/Phoenix/release-extras/linux/gtk3/ubuntu-14.04 \
wxPython &&
python -c 'import wx' &&
echo 'wxPython is available' ||
echo 'wxPython is not available'
if [[ $BUILD_DOCS == true ]]; then
pip install $PRE -r doc-requirements.txt
fi
Expand Down
17 changes: 8 additions & 9 deletions lib/matplotlib/tests/test_backends_interactive.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,16 +20,15 @@


def _get_available_backends():
if sys.version_info < (3,):
return []
else:
return [
pytest.mark.skipif(
importlib.util.find_spec(module_name) is None,
reason="Could not import {!r}".format(module_name))(backend)
for module_name, backend in [
return [
pytest.mark.skipif(sys.version_info < (3,)
or importlib.util.find_spec(module_name) is None,
reason="Could not import {!r}".format(module_name))(
backend)
for module_name, backend in [
("PyQt5", "qt5agg"),
("tkinter", "tkagg")]]
("tkinter", "tkagg"),
("wx", "wxagg")]]


_test_script = """\
Expand Down

0 comments on commit 9b9c24c

Please sign in to comment.