Commit 15c8ac47 authored by Daniel Scheffler's avatar Daniel Scheffler
Browse files

Added nosetests. Resolved some setup requirements by conda during test_arosics_install.

parent 52eca1ff
Pipeline #698 failed with stages
in 5 minutes and 37 seconds
......@@ -23,12 +23,14 @@ test_arosics:
- source /root/anaconda3/bin/activate
- export GDAL_DATA=/root/anaconda3/share/gdal
- export PYTHONPATH=$PYTHONPATH:/root # /root <- directory needed later
- make coverage
- make nosetests
- make docs
artifacts:
paths:
- htmlcov/
- docs/_build/html/
- nosetests.html
- nosetests.xml
test_arosics_install:
......@@ -37,6 +39,7 @@ test_arosics_install:
- source /root/anaconda3/bin/activate
- conda create -y -q --name arosics python=3.5
- source activate arosics
- conda install --yes -c conda-forge numpy gdal scikit-image matplotlib # resolve these requirements with conda
- python setup.py install
- cd ..
- pwd
......@@ -52,6 +55,8 @@ pages:
script:
- mkdir -p public/coverage
- cp -r htmlcov/* public/coverage/
- mkdir -p public/nosetests_reports
- cp nosetests.* public/nosetests_reports/
- mkdir -p public/doc
- cp -r docs/_build/html/* public/doc/
......
.PHONY: clean clean-test clean-pyc clean-build docs help
.PHONY: clean clean-test clean-pyc clean-build docs help nosetests
.DEFAULT_GOAL := help
define BROWSER_PYSCRIPT
import os, webbrowser, sys
......@@ -43,28 +43,38 @@ clean-pyc: ## remove Python file artifacts
find . -name '__pycache__' -exec rm -fr {} +
clean-test: ## remove test and coverage artifacts
coverage erase
## don't include 'coverage erase' lib here because clean-test is also executed during package setup and coverage is
## only a test requirement
rm -fr .tox/
rm -f .coverage
rm -fr htmlcov/
rm -fr nosetests.html
rm -fr nosetests.xml
lint: ## check style with flake8
flake8 arosics tests
test: ## run tests quickly with the default Python
python setup.py test
python setup.py test
test-all: ## run tests on every Python version with tox
tox
coverage: ## check code coverage quickly with the default Python
coverage erase
coverage run --source arosics setup.py test
coverage combine # must be called in order to make coverage work in multiprocessing
coverage report -m
coverage html
#$(BROWSER) htmlcov/index.html
nosetests: clean-test ## Runs nosetests with coverage, xUnit and nose-html-output
## - puts the coverage results in the folder 'htmlcov'
## - generates 'nosetests.html' (--with-html)
## - generates 'nosetests.xml' (--with-xunit) which is currently not visualizable by GitLab
nosetests -vv --with-coverage --cover-package=arosics --cover-erase --cover-html --cover-html-dir=htmlcov \
--with-html --with-xunit --rednose --force-color
docs: ## generate Sphinx HTML documentation, including API docs
rm -f docs/arosics.rst
rm -f docs/modules.rst
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment