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 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