提交 bc24a80c authored 作者: notoraptor's avatar notoraptor 提交者: GitHub

Added nose-exclude plugin to exclude folders

Added the installation of nose-exclude plugin for nosetests. This plugin should allow us to exclude folders with `nosetests --exclude-dir=path/to/directory` Tests rewritten to use nose-exclude and to fix some nosetests syntax about file exclusion.
上级 38a9a087
...@@ -32,18 +32,20 @@ addons: ...@@ -32,18 +32,20 @@ addons:
install: install:
# In Python 3.3, we test the min version of NumPy and SciPy. In Python 2.7, we test more recent version. # In Python 3.3, we test the min version of NumPy and SciPy. In Python 2.7, we test more recent version.
# nose-exclude plugin should allow use to tell nosetests to exclude folder with --exclude-dir=path/to/directory.
- if [[ $TRAVIS_PYTHON_VERSION == '2.7' ]]; then conda create --yes -q -n pyenv mkl python=2.7 numpy=1.9.1 scipy=0.14.0 nose=1.3.0 pip flake8=2.3 six=1.9.0 pep8=1.6.2 pyflakes=0.8.1 sphinx mkl-service libgfortran=1; fi - if [[ $TRAVIS_PYTHON_VERSION == '2.7' ]]; then conda create --yes -q -n pyenv mkl python=2.7 numpy=1.9.1 scipy=0.14.0 nose=1.3.0 pip flake8=2.3 six=1.9.0 pep8=1.6.2 pyflakes=0.8.1 sphinx mkl-service libgfortran=1; fi
- if [[ $TRAVIS_PYTHON_VERSION == '3.3' ]]; then conda create --yes -q -n pyenv mkl python=3.3 numpy=1.9.1 scipy=0.14.0 nose=1.3.4 pip flake8=2.3 six=1.9.0 pep8=1.6.2 pyflakes=0.8.1 sphinx mkl-service; fi - if [[ $TRAVIS_PYTHON_VERSION == '3.3' ]]; then conda create --yes -q -n pyenv mkl python=3.3 numpy=1.9.1 scipy=0.14.0 nose=1.3.4 pip flake8=2.3 six=1.9.0 pep8=1.6.2 pyflakes=0.8.1 sphinx mkl-service; fi
- source activate pyenv - source activate pyenv
- if [[ $TRAVIS_PYTHON_VERSION == '2.7' ]]; then pip install pydot; else pip install pydot-ng; fi - if [[ $TRAVIS_PYTHON_VERSION == '2.7' ]]; then pip install pydot; else pip install pydot-ng; fi
- pip install . --no-deps - pip install . --no-deps
- pip install flake8-future-import nose-parameterized==0.5.0 sphinx_rtd_theme - pip install flake8-future-import nose-parameterized==0.5.0 sphinx_rtd_theme
- pip install nose-exclude
# command to run tests # command to run tests
env: env:
- PART="theano/tests/test_flake8.py" DOC=1 - PART="theano/tests/test_flake8.py" DOC=1
- PART="-e test_flake8.py theano/compat theano/compile theano/d3viz theano/gof theano/misc theano/sandbox theano/scalar theano/scan_module theano/sparse theano/tests theano/typed_list" - PART="-e test_flake8.py theano/compat theano/compile theano/d3viz theano/gof theano/misc theano/sandbox theano/scalar theano/scan_module theano/sparse theano/tests theano/typed_list"
- PART="theano/tensor -e theano/tensor/tests/test_basic.py" - PART="theano/tensor -e test_basic.py"
- PART="theano/tensor/tests/test_basic.py" - PART="theano/tensor/tests/test_basic.py"
matrix: matrix:
...@@ -51,11 +53,11 @@ matrix: ...@@ -51,11 +53,11 @@ matrix:
include: include:
- python: "3.3" - python: "3.3"
env: env:
- PART="-e theano/tensor test_flake8.py ." THEANO_FLAGS="mode=FAST_COMPILE" - PART="--exclude-dir=theano/tensor -e test_flake8.py ." THEANO_FLAGS="mode=FAST_COMPILE"
- PART="theano/tensor" THEANO_FLAGS="mode=FAST_COMPILE" - PART="theano/tensor" THEANO_FLAGS="mode=FAST_COMPILE"
- python: "2.7" - python: "2.7"
env: env:
- PART="-e theano/tensor test_flake8.py ." THEANO_FLAGS="mode=FAST_COMPILE,floatX=float32" - PART="--exclude-dir=theano/tensor -e test_flake8.py ." THEANO_FLAGS="mode=FAST_COMPILE,floatX=float32"
- PART="theano/tensor" THEANO_FLAGS="mode=FAST_COMPILE,floatX=float32" - PART="theano/tensor" THEANO_FLAGS="mode=FAST_COMPILE,floatX=float32"
script: script:
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论