File tree Expand file tree Collapse file tree 4 files changed +21
-5
lines changed Expand file tree Collapse file tree 4 files changed +21
-5
lines changed Original file line number Diff line number Diff line change 36
36
- DISTRIB="conda" PYTHON_VERSION="3.6" INSTALL_MKL="true"
37
37
NUMPY_VERSION="1.11.2" SCIPY_VERSION="0.18.1" PANDAS_VERSION="0.19.1"
38
38
CYTHON_VERSION="0.25.2"
39
+ # This environment use pytest to run the tests. It uses the newest
40
+ # supported anaconda env. It also runs tests requiring Pandas.
41
+ - USE_PYTEST="true" DISTRIB="conda" PYTHON_VERSION="3.6" INSTALL_MKL="true"
42
+ NUMPY_VERSION="1.11.2" SCIPY_VERSION="0.18.1" PANDAS_VERSION="0.19.1"
43
+ CYTHON_VERSION="0.25.2"
39
44
# flake8 linting on diff wrt common ancestor with upstream/master
40
45
- RUN_FLAKE8="true" SKIP_TESTS="true"
41
46
DISTRIB="conda" PYTHON_VERSION="3.5" INSTALL_MKL="true"
Original file line number Diff line number Diff line change @@ -51,13 +51,13 @@ if [[ "$DISTRIB" == "conda" ]]; then
51
51
# Configure the conda environment and put it in the path using the
52
52
# provided versions
53
53
if [[ " $INSTALL_MKL " == " true" ]]; then
54
- conda create -n testenv --yes python=$PYTHON_VERSION pip nose \
54
+ conda create -n testenv --yes python=$PYTHON_VERSION pip nose pytest \
55
55
numpy=$NUMPY_VERSION scipy=$SCIPY_VERSION \
56
56
mkl cython=$CYTHON_VERSION \
57
57
${PANDAS_VERSION+pandas=$PANDAS_VERSION }
58
58
59
59
else
60
- conda create -n testenv --yes python=$PYTHON_VERSION pip nose \
60
+ conda create -n testenv --yes python=$PYTHON_VERSION pip nose pytest \
61
61
numpy=$NUMPY_VERSION scipy=$SCIPY_VERSION \
62
62
nomkl cython=$CYTHON_VERSION \
63
63
${PANDAS_VERSION+pandas=$PANDAS_VERSION }
Original file line number Diff line number Diff line change @@ -21,6 +21,11 @@ except ImportError:
21
21
python -c " import multiprocessing as mp; print('%d CPUs' % mp.cpu_count())"
22
22
23
23
run_tests () {
24
+ if [[ " $USE_PYTEST " == " true" ]]; then
25
+ TEST_CMD=" pytest --pyargs"
26
+ else
27
+ TEST_CMD=" nosetests --with-coverage" # --with-timer --timer-top-n 20"
28
+ fi
24
29
# Get into a temp directory to run test from the installed scikit learn and
25
30
# check if we do not leave artifacts
26
31
mkdir -p $TEST_DIR
@@ -34,10 +39,9 @@ run_tests() {
34
39
export SKLEARN_SKIP_NETWORK_TESTS=1
35
40
36
41
if [[ " $COVERAGE " == " true" ]]; then
37
- nosetests -s --with-coverage --with-timer --timer-top-n 20 sklearn
38
- else
39
- nosetests -s --with-timer --timer-top-n 20 sklearn
42
+ TEST_CMD=" $TEST_CMD --with-coverage"
40
43
fi
44
+ $TEST_CMD sklearn
41
45
42
46
# Test doc
43
47
cd $OLDPWD
Original file line number Diff line number Diff line change @@ -22,6 +22,13 @@ doctest-fixtures = _fixture
22
22
ignore-files =^setup\.py$
23
23
# doctest-options = +ELLIPSIS,+NORMALIZE_WHITESPACE
24
24
25
+ [tool:pytest]
26
+ # disable-pytest-warnings should be removed once we drop nose and we
27
+ # replace yield test by parametrize
28
+ addopts =
29
+ --doctest-modules
30
+ --disable-pytest-warnings
31
+
25
32
[wheelhouse_uploader]
26
33
artifact_indexes =
27
34
# OSX wheels built by travis (only for specific tags):
You can’t perform that action at this time.
0 commit comments