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
93
93
make_conda " python=$PYTHON_VERSION "
94
94
python -m pip install numpy scipy joblib cython
95
95
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
97
97
fi
98
98
99
99
if [[ " $COVERAGE " == " true" ]]; then
Original file line number Diff line number Diff line change 13
13
14
14
from sklearn import set_config
15
15
from sklearn .utils import _IS_32BIT
16
+ from sklearn .externals import _pilutil
16
17
17
18
PYTEST_MIN_VERSION = '3.3.0'
18
19
@@ -68,6 +69,13 @@ def pytest_collection_modifyitems(config, items):
68
69
for item in items :
69
70
if isinstance (item , DoctestItem ):
70
71
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 )
71
79
72
80
73
81
def pytest_configure (config ):
You can’t perform that action at this time.
0 commit comments