From 8dc7abf531ce3046a32eab38108493d838854cdf Mon Sep 17 00:00:00 2001 From: Aidan Heerdegen Date: Thu, 14 May 2020 13:47:19 +1000 Subject: [PATCH 1/2] Try and get coveralls working --- .travis.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 4c2fc234..c13df0f3 100644 --- a/.travis.yml +++ b/.travis.yml @@ -17,5 +17,4 @@ script: - if [[ $TRAVIS_PYTHON_VERSION == 3.6 || $TRAVIS_PYTHON_VERSION == 3.7 ]]; then PYTHONPATH=. coverage run --source payu -m py.test -s test; fi; - cd docs && make html after_success: - - coverage report -m - - coveralls + - if [[ $TRAVIS_PYTHON_VERSION == 3.7 ]]; then coverage report -m; coveralls; fi; From ca5af564aa3f5b8c4a21af41b65f1ed7e8785c81 Mon Sep 17 00:00:00 2001 From: Aidan Heerdegen Date: Thu, 14 May 2020 14:00:20 +1000 Subject: [PATCH 2/2] Switched to using pytest-cov for coverage testing --- .travis.yml | 4 ++-- test/requirements_test.txt | 6 ++---- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/.travis.yml b/.travis.yml index c13df0f3..382a8896 100644 --- a/.travis.yml +++ b/.travis.yml @@ -14,7 +14,7 @@ before_script: script: - payu list - pylint --extension-pkg-whitelist=netCDF4 -E payu - - if [[ $TRAVIS_PYTHON_VERSION == 3.6 || $TRAVIS_PYTHON_VERSION == 3.7 ]]; then PYTHONPATH=. coverage run --source payu -m py.test -s test; fi; + - if [[ $TRAVIS_PYTHON_VERSION == 3.6 || $TRAVIS_PYTHON_VERSION == 3.7 ]]; then PYTHONPATH=. pytest --cov=payu -s test; fi; - cd docs && make html after_success: - - if [[ $TRAVIS_PYTHON_VERSION == 3.7 ]]; then coverage report -m; coveralls; fi; + - if [[ $TRAVIS_PYTHON_VERSION == 3.6 || $TRAVIS_PYTHON_VERSION == 3.7 ]]; then coverage report -m; coveralls; fi; diff --git a/test/requirements_test.txt b/test/requirements_test.txt index 7265e198..7b88a3b9 100644 --- a/test/requirements_test.txt +++ b/test/requirements_test.txt @@ -1,9 +1,7 @@ -coverage == 3.7.1 ; python_version == '3.2' -coverage ; python_version != '3.2' +coverage coveralls pytest pylint mnctools -scipy Sphinx -numpy>=1.16.0 +pytest-cov