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

Skip to content

Add basic testing of wxagg backend. #8676

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 29, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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