From 96dcb3303ea198f8b4dd6309c64e020ef108b51b Mon Sep 17 00:00:00 2001 From: Elliott Sales de Andrade Date: Tue, 23 May 2017 01:08:24 -0400 Subject: [PATCH 1/2] TST: Don't install pytest-warnings on CI. Pytest 3.1 now has this plugin rolled into itself. --- .appveyor.yml | 2 +- .travis.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.appveyor.yml b/.appveyor.yml index 0a226c51be94..fa7bc6199611 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -94,7 +94,7 @@ install: - echo %PYTHON_VERSION% %TARGET_ARCH% - if %PYTHON_VERSION% == 2.7 conda install -q backports.functools_lru_cache # pytest-cov>=2.3.1 due to https://github.com/pytest-dev/pytest-cov/issues/124 - - pip install -q pytest "pytest-cov>=2.3.1" pytest-rerunfailures pytest-timeout pytest-warnings pytest-xdist + - pip install -q pytest "pytest-cov>=2.3.1" pytest-rerunfailures pytest-timeout pytest-xdist # Let the install prefer the static builds of the libs - set LIBRARY_LIB=%CONDA_PREFIX%\Library\lib diff --git a/.travis.yml b/.travis.yml index 740e6f0113e6..05fee36ae4b8 100644 --- a/.travis.yml +++ b/.travis.yml @@ -121,7 +121,7 @@ install: fi # pytest-cov>=2.3.1 due to https://github.com/pytest-dev/pytest-cov/issues/124 - pip install $PRE pytest 'pytest-cov>=2.3.1' pytest-faulthandler pytest-rerunfailures pytest-timeout pytest-warnings pytest-xdist $INSTALL_PEP8 + pip install $PRE pytest 'pytest-cov>=2.3.1' pytest-faulthandler pytest-rerunfailures pytest-timeout pytest-xdist $INSTALL_PEP8 # We manually install humor sans using the package from Ubuntu 14.10. Unfortunatly humor sans is not # availible in the Ubuntu version used by Travis but we can manually install the deb from a later From 05b88ad369a8d38fb14c2b03f5f0dc15de2e173f Mon Sep 17 00:00:00 2001 From: Elliott Sales de Andrade Date: Tue, 23 May 2017 01:41:17 -0400 Subject: [PATCH 2/2] Fix check for pytest-marked extensions. All because of the mixed subplots test which marks one extension as xfail. This was technically not checked correctly, but ended up with the same result of the 'svg' extension being treated as xfail. --- lib/matplotlib/testing/decorators.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/matplotlib/testing/decorators.py b/lib/matplotlib/testing/decorators.py index 3a0dd4e0f9a8..c5e069b318ee 100644 --- a/lib/matplotlib/testing/decorators.py +++ b/lib/matplotlib/testing/decorators.py @@ -223,7 +223,11 @@ def _xfail_if_format_is_uncomparable(extension): def _mark_xfail_if_format_is_uncomparable(extension): - will_fail = extension not in comparable_formats() + if isinstance(extension, six.string_types): + will_fail = extension not in comparable_formats() + else: + # Extension might be a pytest marker instead of a plain string. + will_fail = extension.args[0] not in comparable_formats() if will_fail: fail_msg = 'Cannot compare %s files on this system' % extension import pytest