Skip to content

Commit 740ce99

Browse files
authored
Merge pull request #8655 from QuLogic/fix-pytest31
TST: Fix tests against pytest 3.1
2 parents 2a631da + 05b88ad commit 740ce99

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

.appveyor.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ install:
9494
- echo %PYTHON_VERSION% %TARGET_ARCH%
9595
- if %PYTHON_VERSION% == 2.7 conda install -q backports.functools_lru_cache
9696
# pytest-cov>=2.3.1 due to https://github.com/pytest-dev/pytest-cov/issues/124
97-
- pip install -q pytest "pytest-cov>=2.3.1" pytest-rerunfailures pytest-timeout pytest-warnings pytest-xdist
97+
- pip install -q pytest "pytest-cov>=2.3.1" pytest-rerunfailures pytest-timeout pytest-xdist
9898

9999
# Let the install prefer the static builds of the libs
100100
- set LIBRARY_LIB=%CONDA_PREFIX%\Library\lib

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ install:
121121
fi
122122
123123
# pytest-cov>=2.3.1 due to https://github.com/pytest-dev/pytest-cov/issues/124
124-
pip install $PRE pytest 'pytest-cov>=2.3.1' pytest-faulthandler pytest-rerunfailures pytest-timeout pytest-warnings pytest-xdist $INSTALL_PEP8
124+
pip install $PRE pytest 'pytest-cov>=2.3.1' pytest-faulthandler pytest-rerunfailures pytest-timeout pytest-xdist $INSTALL_PEP8
125125
126126
# We manually install humor sans using the package from Ubuntu 14.10. Unfortunatly humor sans is not
127127
# availible in the Ubuntu version used by Travis but we can manually install the deb from a later

lib/matplotlib/testing/decorators.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,11 @@ def _xfail_if_format_is_uncomparable(extension):
223223

224224

225225
def _mark_xfail_if_format_is_uncomparable(extension):
226-
will_fail = extension not in comparable_formats()
226+
if isinstance(extension, six.string_types):
227+
will_fail = extension not in comparable_formats()
228+
else:
229+
# Extension might be a pytest marker instead of a plain string.
230+
will_fail = extension.args[0] not in comparable_formats()
227231
if will_fail:
228232
fail_msg = 'Cannot compare %s files on this system' % extension
229233
import pytest

0 commit comments

Comments
 (0)