Skip to content

Commit e36d722

Browse files
committed
TST/CI: Use pytest
update ci
1 parent 6f417a5 commit e36d722

14 files changed

+46
-34
lines changed

.travis.yml

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ matrix:
3535
osx_image: xcode6.4
3636
env:
3737
- JOB_NAME: "35_osx"
38-
- NOSE_ARGS="not slow and not network and not disabled"
38+
- NOSE_ARGS="--skip-slow --skip-network"
3939
- BUILD_TYPE=conda
4040
- JOB_TAG=_OSX
4141
- TRAVIS_PYTHON_VERSION=3.5
@@ -44,7 +44,7 @@ matrix:
4444
- python: 2.7
4545
env:
4646
- JOB_NAME: "27_slow_nnet_LOCALE"
47-
- NOSE_ARGS="slow and not network and not disabled"
47+
- NOSE_ARGS="--skip-network"
4848
- LOCALE_OVERRIDE="zh_CN.UTF-8"
4949
- FULL_DEPS=true
5050
- JOB_TAG=_LOCALE
@@ -57,7 +57,7 @@ matrix:
5757
- python: 2.7
5858
env:
5959
- JOB_NAME: "27_nslow"
60-
- NOSE_ARGS="not slow and not disabled"
60+
- NOSE_ARGS="--skip-slow"
6161
- FULL_DEPS=true
6262
- CLIPBOARD_GUI=gtk2
6363
- LINT=true
@@ -70,7 +70,7 @@ matrix:
7070
- python: 3.4
7171
env:
7272
- JOB_NAME: "34_nslow"
73-
- NOSE_ARGS="not slow and not disabled"
73+
- NOSE_ARGS="--skip-slow"
7474
- FULL_DEPS=true
7575
- CLIPBOARD=xsel
7676
- CACHE_NAME="34_nslow"
@@ -82,7 +82,7 @@ matrix:
8282
- python: 3.5
8383
env:
8484
- JOB_NAME: "35_nslow"
85-
- NOSE_ARGS="not slow and not network and not disabled"
85+
- NOSE_ARGS="--skip-slow --skip-network"
8686
- FULL_DEPS=true
8787
- CLIPBOARD=xsel
8888
- COVERAGE=true
@@ -97,7 +97,7 @@ matrix:
9797
env:
9898
- JOB_NAME: "27_slow"
9999
- JOB_TAG=_SLOW
100-
- NOSE_ARGS="slow and not network and not disabled"
100+
- NOSE_ARGS="--skip-network"
101101
- FULL_DEPS=true
102102
- CACHE_NAME="27_slow"
103103
- USE_CACHE=true
@@ -106,7 +106,7 @@ matrix:
106106
env:
107107
- JOB_NAME: "34_slow"
108108
- JOB_TAG=_SLOW
109-
- NOSE_ARGS="slow and not network and not disabled"
109+
- NOSE_ARGS="--skip-network"
110110
- FULL_DEPS=true
111111
- CLIPBOARD=xsel
112112
- CACHE_NAME="34_slow"
@@ -120,7 +120,7 @@ matrix:
120120
env:
121121
- JOB_NAME: "27_build_test_conda"
122122
- JOB_TAG=_BUILD_TEST
123-
- NOSE_ARGS="not slow and not disabled"
123+
- NOSE_ARGS="--skip-slow"
124124
- FULL_DEPS=true
125125
- BUILD_TEST=true
126126
- CACHE_NAME="27_build_test_conda"
@@ -130,7 +130,7 @@ matrix:
130130
env:
131131
- JOB_NAME: "35_numpy_dev"
132132
- JOB_TAG=_NUMPY_DEV
133-
- NOSE_ARGS="not slow and not network and not disabled"
133+
- NOSE_ARGS="--skip-slow --skip-network"
134134
- PANDAS_TESTING_MODE="deprecate"
135135
- CACHE_NAME="35_numpy_dev"
136136
- USE_CACHE=true
@@ -143,7 +143,7 @@ matrix:
143143
- python: 2.7
144144
env:
145145
- JOB_NAME: "27_nslow_nnet_COMPAT"
146-
- NOSE_ARGS="not slow and not network and not disabled"
146+
- NOSE_ARGS="--skip-slow --skip-network"
147147
- LOCALE_OVERRIDE="it_IT.UTF-8"
148148
- INSTALL_TEST=true
149149
- JOB_TAG=_COMPAT
@@ -167,15 +167,15 @@ matrix:
167167
env:
168168
- JOB_NAME: "27_slow"
169169
- JOB_TAG=_SLOW
170-
- NOSE_ARGS="slow and not network and not disabled"
170+
- NOSE_ARGS="--skip-network"
171171
- FULL_DEPS=true
172172
- CACHE_NAME="27_slow"
173173
- USE_CACHE=true
174174
- python: 3.4
175175
env:
176176
- JOB_NAME: "34_slow"
177177
- JOB_TAG=_SLOW
178-
- NOSE_ARGS="slow and not network and not disabled"
178+
- NOSE_ARGS="--skip-network"
179179
- FULL_DEPS=true
180180
- CLIPBOARD=xsel
181181
- CACHE_NAME="34_slow"
@@ -188,7 +188,7 @@ matrix:
188188
env:
189189
- JOB_NAME: "27_build_test_conda"
190190
- JOB_TAG=_BUILD_TEST
191-
- NOSE_ARGS="not slow and not disabled"
191+
- NOSE_ARGS="--skip-slow"
192192
- FULL_DEPS=true
193193
- BUILD_TEST=true
194194
- CACHE_NAME="27_build_test_conda"
@@ -197,7 +197,7 @@ matrix:
197197
env:
198198
- JOB_NAME: "35_numpy_dev"
199199
- JOB_TAG=_NUMPY_DEV
200-
- NOSE_ARGS="not slow and not network and not disabled"
200+
- NOSE_ARGS="--skip-slow --skip-network"
201201
- PANDAS_TESTING_MODE="deprecate"
202202
- CACHE_NAME="35_numpy_dev"
203203
- USE_CACHE=true
@@ -209,7 +209,7 @@ matrix:
209209
- python: 2.7
210210
env:
211211
- JOB_NAME: "27_nslow_nnet_COMPAT"
212-
- NOSE_ARGS="not slow and not network and not disabled"
212+
- NOSE_ARGS="--skip-slow --skip-network"
213213
- LOCALE_OVERRIDE="it_IT.UTF-8"
214214
- INSTALL_TEST=true
215215
- JOB_TAG=_COMPAT

appveyor.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ install:
9292
- cmd: '%CMD_IN_ENV% conda build ci\appveyor.recipe -q'
9393

9494
# create our env
95-
- cmd: conda create -q -n pandas python=%PYTHON_VERSION% nose
95+
- cmd: conda create -q -n pandas python=%PYTHON_VERSION% nose pytest
9696
- cmd: activate pandas
9797
- SET REQ=ci\requirements-%PYTHON_VERSION%-%PYTHON_ARCH%.run
9898
- cmd: echo "installing requirements from %REQ%"
@@ -104,4 +104,5 @@ test_script:
104104
- cd \
105105
- cmd: activate pandas
106106
- cmd: conda list
107-
- cmd: nosetests --exe -A "not slow and not network and not disabled" pandas
107+
# - cmd: nosetests --exe -A "not slow and not network and not disabled" pandas
108+
- cmd: py.test pandas --skipslow

ci/install_appveyor.ps1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -126,8 +126,8 @@ function UpdateConda ($python_home) {
126126
function main () {
127127
InstallMiniconda $env:PYTHON_VERSION $env:PYTHON_ARCH $env:PYTHON
128128
UpdateConda $env:PYTHON
129-
InstallCondaPackages $env:PYTHON "pip setuptools nose"
129+
InstallCondaPackages $env:PYTHON "pip setuptools nose pytest"
130130
InstallCondaPackagesFromFile $env:PYTHON $env:PYTHON_VERSION $env:PYTHON_ARCH
131131
}
132132

133-
main
133+
main

ci/install_test.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@ if [ "$INSTALL_TEST" ]; then
88
conda uninstall cython || exit 1
99
python "$TRAVIS_BUILD_DIR"/setup.py sdist --formats=zip,gztar || exit 1
1010
pip install "$TRAVIS_BUILD_DIR"/dist/*tar.gz || exit 1
11-
nosetests --exe -A "$NOSE_ARGS" pandas/tests/test_series.py --with-xunit --xunit-file=/tmp/nosetests_install.xml
11+
# nosetests --exe -A "$NOSE_ARGS" pandas/tests/test_series.py --with-xunit --xunit-file=/tmp/nosetests_install.xml
12+
py.test pandas/tests/test_series.py --junitxml=/tmp/pytest_install.xml
1213
else
1314
echo "Skipping installation test."
1415
fi

ci/install_travis.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ else
8585
# Useful for debugging any issues with conda
8686
conda info -a || exit 1
8787

88-
time conda create -n pandas python=$TRAVIS_PYTHON_VERSION nose coverage flake8 || exit 1
88+
time conda create -n pandas python=$TRAVIS_PYTHON_VERSION nose pytest coverage flake8 || exit 1
8989

9090
fi
9191
# build deps

ci/requirements_all.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
nose
2+
pytest
23
flake8
34
sphinx
45
ipython

ci/requirements_dev.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,6 @@ pytz
33
numpy
44
cython
55
nose
6+
pytest
7+
pytest-cov
68
flake8

ci/script.sh

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ echo "inside $0"
44

55
source activate pandas
66

7+
pip install --upgrade --no-deps git+https://github.com/pytest-dev/pytest.git@features pytest-cov
78
# don't run the tests for the doc build
89
if [ x"$DOC_BUILD" != x"" ]; then
910
exit 0
@@ -20,11 +21,11 @@ fi
2021
if [ "$BUILD_TEST" ]; then
2122
echo "We are not running nosetests as this is simply a build test."
2223
elif [ "$COVERAGE" ]; then
23-
echo nosetests --exe -A "$NOSE_ARGS" pandas --with-coverage --with-xunit --xunit-file=/tmp/nosetests.xml
24-
nosetests --exe -A "$NOSE_ARGS" pandas --with-coverage --cover-package=pandas --cover-tests --with-xunit --xunit-file=/tmp/nosetests.xml
24+
echo py.test -s --cov=pandas --cov-report --junitxml=/tmp/nosetests.xml $NOSE_ARGS pandas
25+
py.test -s --cov=pandas --cov-report --junitxml=/tmp/nosetests.xml $NOSE_ARGS pandas
2526
else
26-
echo nosetests --exe -A "$NOSE_ARGS" pandas --doctest-tests --with-xunit --xunit-file=/tmp/nosetests.xml
27-
nosetests --exe -A "$NOSE_ARGS" pandas --doctest-tests --with-xunit --xunit-file=/tmp/nosetests.xml
27+
echo py.test --junitxml=/tmp/nosetests.xml $NOSE_ARGS pandas
28+
py.test --junitxml=/tmp/nosetests.xml $NOSE_ARGS pandas # TODO: doctest
2829
fi
2930

3031
RET="$?"

test.bat

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
:: test on windows
22

3-
nosetests --exe -A "not slow and not network and not disabled" pandas %*
3+
:: nosetests --exe -A "not slow and not network and not disabled" pandas %*
4+
py.test pandas

test.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@ command -v python-coverage >/dev/null && python-coverage erase
44
# nosetests pandas/tests/test_index.py --with-coverage --cover-package=pandas.core --pdb-failure --pdb
55
#nosetests -w pandas --with-coverage --cover-package=pandas --pdb-failure --pdb #--cover-inclusive
66
#nosetests -A "not slow" -w pandas/tseries --with-coverage --cover-package=pandas.tseries $* #--cover-inclusive
7-
nosetests -w pandas --with-coverage --cover-package=pandas $*
7+
# nosetests -w pandas --with-coverage --cover-package=pandas $*
8+
py.test pandas --with-coverage --cover-package=pandas $*
89
# nosetests -w pandas/io --with-coverage --cover-package=pandas.io --pdb-failure --pdb
910
# nosetests -w pandas/core --with-coverage --cover-package=pandas.core --pdb-failure --pdb
1011
# nosetests -w pandas/stats --with-coverage --cover-package=pandas.stats

test_fast.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1-
nosetests -A "not slow and not network" pandas --with-id $*
1+
# nosetests -A "not slow and not network" pandas --with-id $*
2+
py.test pandas

test_multi.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1-
nosetests -A "not slow and not network" pandas --processes=4 $*
1+
# nosetests -A "not slow and not network" pandas --processes=4 $*
2+
py.test pandas

test_rebuild.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@ python setup.py build_ext --inplace
55
coverage erase
66
# nosetests pandas/tests/test_index.py --with-coverage --cover-package=pandas.core --pdb-failure --pdb
77
#nosetests -w pandas --with-coverage --cover-package=pandas --pdb-failure --pdb #--cover-inclusive
8-
nosetests -w pandas --with-coverage --cover-package=pandas $* #--cover-inclusive
8+
# nosetests -w pandas --with-coverage --cover-package=pandas $* #--cover-inclusive
9+
py.test pandas --with-coverage --cover-package=pandas $* #--cover-inclusive
910
# nosetests -w pandas/io --with-coverage --cover-package=pandas.io --pdb-failure --pdb
1011
# nosetests -w pandas/core --with-coverage --cover-package=pandas.core --pdb-failure --pdb
1112
# nosetests -w pandas/stats --with-coverage --cover-package=pandas.stats

tox.ini

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ envlist = py27, py34, py35
1010
deps =
1111
cython
1212
nose
13+
pytest
1314
pytz>=2011k
1415
python-dateutil
1516
beautifulsoup4
@@ -26,7 +27,7 @@ changedir = {envdir}
2627

2728
commands =
2829
# TODO: --exe because of GH #761
29-
{envbindir}/nosetests --exe pandas {posargs:-A "not network and not disabled"}
30+
{envbindir}/py.test pandas {posargs:-A "not network and not disabled"}
3031
# cleanup the temp. build dir created by the tox build
3132
# /bin/rm -rf {toxinidir}/build
3233

@@ -63,18 +64,18 @@ usedevelop = True
6364
deps =
6465
{[testenv]deps}
6566
openpyxl<2.0.0
66-
commands = {envbindir}/nosetests {toxinidir}/pandas/io/tests/test_excel.py
67+
commands = {envbindir}/py.test {toxinidir}/pandas/io/tests/test_excel.py
6768

6869
[testenv:openpyxl20]
6970
usedevelop = True
7071
deps =
7172
{[testenv]deps}
7273
openpyxl<2.2.0
73-
commands = {envbindir}/nosetests {posargs} {toxinidir}/pandas/io/tests/test_excel.py
74+
commands = {envbindir}/py.test {posargs} {toxinidir}/pandas/io/tests/test_excel.py
7475

7576
[testenv:openpyxl22]
7677
usedevelop = True
7778
deps =
7879
{[testenv]deps}
7980
openpyxl>=2.2.0
80-
commands = {envbindir}/nosetests {posargs} {toxinidir}/pandas/io/tests/test_excel.py
81+
commands = {envbindir}/py.test {posargs} {toxinidir}/pandas/io/tests/test_excel.py

0 commit comments

Comments
 (0)