Skip to content

Commit b1c25df

Browse files
committed
updated tox, travis, and moved gdal script into utils
1 parent 4d8c643 commit b1c25df

File tree

4 files changed

+8
-5
lines changed

4 files changed

+8
-5
lines changed

.travis.yml

+3-2
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ before_install:
4343
- pip install -U pip
4444
- pip install wheel
4545
- pip install python-daemon==2.1.1
46-
- . ./scripts/travis_gdal_install.sh
46+
- . ./utils/travis_gdal_install.sh
4747
- export PATH=$GDALINST/gdal-$GDALVERSION/bin:$PATH
4848
- export LD_LIBRARY_PATH=$GDALINST/gdal-$GDALVERSION/lib:$LD_LIBRARY_PATH
4949

@@ -59,7 +59,8 @@ install:
5959

6060
# command to run tests, e.g. python setup.py test
6161
script:
62-
- py.test --cov-report term-missing:skip-covered --cov=pyrate tests/
62+
- if [[ $TRAVIS_PYTHON_VERSION == 2.7 && $GDALVERSION == 2.0.0 ]]; then mpirun -n 4 pytest --cov-report term-missing:skip-covered --cov=pyrate tests/test_mpi.py; fi
63+
- pytest --cov-report term-missing:skip-covered --cov=pyrate tests/
6364

6465
cache:
6566
- apt

tests/test_mpi.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@
5050
os.environ['TRAVIS_PYTHON_VERSION'] == '3.5') else False
5151
GDAL_VERSION = check_output(["gdal-config", "--version"]).decode(
5252
encoding="utf-8").split('\n')[0]
53-
MPITEST = TRAVIS and GDAL_VERSION == '2.1.0'
53+
MPITEST = TRAVIS and GDAL_VERSION == '2.0.0'
5454

5555

5656
@pytest.fixture()

tox.ini

+4-2
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,13 @@ envlist = py27, py33, py34, py35, py36, style, docs
55
setenv =
66
PYTHONPATH = {toxinidir}:{toxinidir}/PyRate
77
PYRATEPATH = {toxinidir}
8+
TRAVIS = 'dummy'
89
deps =
910
numpy >= 1.9.2
1011
pytest
1112
commands =
12-
py.test --basetemp={envtmpdir}
13+
mpirun -n 4 pytest tests/test_mpi.py --basetemp={envtmpdir}
14+
py.test --basetemp={envtmpdir} tests -k 'not test_mpi.py'
1315

1416
[testenv:py33]
1517
deps =
@@ -21,7 +23,7 @@ deps =
2123
deps =
2224
pylint
2325
commands =
24-
pylint pyrate --ignore=aps.py
26+
pylint pyrate --ignore=pyaps.py
2527

2628
[testenv:docs]
2729
changedir=docs/
File renamed without changes.

0 commit comments

Comments
 (0)