Refactor Python tests. (#3897)

* Deprecate nose tests.
* Format python tests.
This commit is contained in:
Jiaming Yuan
2018-11-15 13:56:33 +13:00
committed by GitHub
parent c76d993681
commit 2ea0f887c1
23 changed files with 302 additions and 225 deletions

View File

@@ -37,7 +37,7 @@ ENV CPP=/opt/rh/devtoolset-2/root/usr/bin/cpp
# Install Python packages
RUN \
pip install numpy nose scipy scikit-learn wheel
pip install numpy pytest scipy scikit-learn wheel
ENV GOSU_VERSION 1.10

View File

@@ -15,8 +15,8 @@ ENV PATH=/opt/python/bin:$PATH
# Install Python packages
RUN \
conda install numpy scipy pandas matplotlib nose scikit-learn && \
pip install nose wheel auditwheel graphviz
conda install numpy scipy pandas matplotlib pytest scikit-learn && \
pip install pytest wheel auditwheel graphviz
ENV GOSU_VERSION 1.10

View File

@@ -4,6 +4,5 @@ set -e
cd python-package
python setup.py install --user
cd ..
python -m nose -v --eval-attr='(not slow) and (not mgpu)' tests/python-gpu/
pytest -v -s --fulltrace -m "(not mgpu) and (not slow)" tests/python-gpu
./testxgboost --gtest_filter=-*.MGPU_*

View File

@@ -4,5 +4,5 @@ set -e
cd python-package
python setup.py install --user
cd ..
python -m nose -v --eval-attr='(not slow) and mgpu' tests/python-gpu/
pytest -v -s --fulltrace -m "(not slow) and mgpu" tests/python-gpu
./testxgboost --gtest_filter=*.MGPU_*