File tree 5 files changed +46
-5
lines changed
<
8000
a class="fgColor-default prc-Link-Link-85e08" data-muted="true" href="#diff-8348786c244e8422aa6fe89069999269480f83636923aefd9dc1909fb0e802b4" muted="" role="presentation" tabindex="-1" data-analytics-opt-out="true">test_docstring_parameters.py
5 files changed +46
-5
lines changed Original file line number Diff line number Diff line change 65
65
path : ~/log.txt
66
66
destination : log.txt
67
67
68
+ pypy3 :
69
+ docker :
70
+ - image : pypy:3-6.0.0
71
+ steps :
72
+ - restore_cache :
73
+ keys :
74
+ - pypy3-ccache-{{ .Branch }}
75
+ - pypy3-ccache
76
+ - checkout
77
+ - run : ./build_tools/circle/build_test_pypy.sh
78
+ - save_cache :
79
+ key : pypy3-ccache-{{ .Branch }}-{{ .BuildNum }}
80
+ paths :
81
+ - ~/.ccache
82
+ - ~/.cache/pip
68
83
69
84
deploy :
70
85
docker :
@@ -89,6 +104,21 @@ workflows:
89
104
jobs :
90
105
- python3
91
106
- python2
107
+ - pypy3 :
108
+ filters :
109
+ branches :
110
+ only :
111
+ - 0.20.X
92
112
- deploy :
93
113
requires :
94
114
- python3
115
+ pypy :
116
+ triggers :
117
+ - schedule :
118
+ cron : " 0 0 * * *"
119
+ filters :
120
+ branches :
121
+ only :
122
+ - master
123
+ jobs :
124
+ - pypy3
Original file line number Diff line number Diff line change @@ -18,13 +18,16 @@ source pypy-env/bin/activate
18
18
python --version
19
19
which python
20
20
21
- pip install --extra-index https://antocuni.github.io/pypy-wheels/ubuntu numpy==1.14.4 Cython pytest
21
+ pip install --extra-index https://antocuni.github.io/pypy-wheels/ubuntu numpy Cython pytest
22
22
pip install " scipy>=1.1.0" sphinx numpydoc docutils
23
23
24
24
ccache -M 512M
25
25
export CCACHE_COMPRESS=1
26
26
export PATH=/usr/lib/ccache:$PATH
27
+ export LOKY_MAX_CPU_COUNT=" 2"
27
28
28
- pip install -e .
29
+ pip install -vv - e .
29
30
30
- make test
31
+ python -m pytest sklearn/
32
+ python -m pytest doc/sphinxext/
33
+ python -m pytest $( find doc -name ' *.rst' | sort)
Original file line number Diff line number Diff line change @@ -32,7 +32,9 @@ def pytest_collection_modifyitems(config, items):
32
32
skip_marker = pytest .mark .skip (
33
33
reason = 'FeatureHasher is not compatible with PyPy' )
34
34
for item in items :
35
- if item .name == 'sklearn.feature_extraction.hashing.FeatureHasher' :
35
+ if item .name in (
36
+ 'sklearn.feature_extraction.hashing.FeatureHasher' ,
37
+ 'sklearn.feature_extraction.text.HashingVectorizer' ):
36
38
item .add_marker (skip_marker )
37
39
38
40
# Skip tests which require internet if the flag is provided
Original file line number Diff line number Diff line change @@ -1108,6 +1108,8 @@ def test_vectorizers_invalid_ngram_range(vec):
1108
1108
message = ("Invalid value for ngram_range=%s "
1109
1109
"lower boundary larger than the upper boundary."
1110
1110
% str (invalid_range ))
1111
+ if isinstance (vec , HashingVectorizer ):
1112
+ pytest .xfail (reason = 'HashingVectorizer not supported on PyPy' )
1111
1113
1112
1114
assert_raise_message (
1113
1115
ValueError , message , vec .fit , ["good news everyone" ])
@@ -1119,6 +1121,7 @@ def test_vectorizers_invalid_ngram_range(vec):
1119
1121
ValueError , message , vec .transform , ["good news everyone" ])
1120
1122
1121
1123
1124
+ @fails_if_pypy
1122
1125
def test_vectorizer_stop_words_inconsistent ():
1123
1126
if PY2 :
1124
1127
lstr = "[u'and', u'll', u've']"
Original file line number Diff line number Diff line change 19
19
from sklearn .utils .testing import ignore_warnings
20
20
from sklearn .utils .deprecation import _is_deprecated
21
21
22
+ import pytest
23
+
22
24
PUBLIC_MODULES = set ([pckg [1 ] for pckg in walk_packages (prefix = 'sklearn.' ,
23
25
path = sklearn .__path__ )
24
26
if not ("._" in pckg [1 ] or ".tests." in pckg [1 ])])
45
47
46
48
# numpydoc 0.8.0's docscrape tool raises because of collections.abc under
47
49
# Python 3.7
48
- @ignore_warnings (category = DeprecationWarning )
50
+ @pytest .mark .filterwarnings ('ignore::DeprecationWarning' )
51
+ @pytest .mark .skipif (IS_PYPY , reason = 'test segfaults on PyPy' )
49
52
def test_docstring_parameters ():
50
53
# Test module docstring formatting
51
54
You can’t perform that action at this time.
0 commit comments