File tree Expand file tree Collapse file tree 2 files changed +9
-1
lines changed Expand file tree Collapse file tree 2 files changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -93,7 +93,7 @@ elif [[ "$DISTRIB" == "conda-pip-latest" ]]; then
9393 make_conda " python=$PYTHON_VERSION "
9494 python -m pip install numpy scipy joblib cython
9595 python -m pip install pytest==$PYTEST_VERSION pytest-cov pytest-xdist
96- python -m pip install pandas matplotlib pyamg pillow
96+ python -m pip install pandas matplotlib pyamg
9797fi
9898
9999if [[ " $COVERAGE " == " true" ]]; then
Original file line number Diff line number Diff line change 1313
1414from sklearn import set_config
1515from sklearn .utils import _IS_32BIT
16+ from sklearn .externals import _pilutil
1617
1718PYTEST_MIN_VERSION = '3.3.0'
1819
@@ -68,6 +69,13 @@ def pytest_collection_modifyitems(config, items):
6869 for item in items :
6970 if isinstance (item , DoctestItem ):
7071 item .add_marker (skip_marker )
72+ elif not _pilutil .pillow_installed :
73+ skip_marker = pytest .mark .skip (reason = "pillow (or PIL) not installed!" )
74+ for item in items :
75+ if item .name in [
76+ "sklearn.feature_extraction.image.PatchExtractor" ,
77+ "sklearn.feature_extraction.image.extract_patches_2d" ]:
78+ item .add_marker (skip_marker )
7179
7280
7381def pytest_configure (config ):
You can’t perform that action at this time.
0 commit comments