Skip to content
Snippets Groups Projects
Commit 47b32a1e authored by Jan Mach's avatar Jan Mach
Browse files

Added support for code test coverage calculations.

(Redmine issue: #3443)
parent a8f53676
No related branches found
No related tags found
No related merge requests found
[run]
source = ./lib
!.gitignore
.directory
.coverage
*~
*.aux
*.log
......
......@@ -41,6 +41,7 @@ VENV_PATH ?= venv
PYTHON = python3
PIP = pip
NOSETESTS = nosetests
COVERAGE = coverage
TWINE = twine
PYBABEL = pybabel
......@@ -149,6 +150,7 @@ help:
@echo " * $(GREEN)pyflakes$(NC): check project with pyflakes"
@echo " * $(GREEN)pylint$(NC): check project with pylint"
@echo " * $(GREEN)test$(NC): run unit tests with nosetest"
@echo " * $(GREEN)coverage$(NC): check test code coverage with nosetest and coverage"
@echo ""
@echo " * $(GREEN)build-webui$(NC): setup web interface locally"
@echo " * $(GREEN)build-package-whl$(NC): actually generate Python package"
......@@ -499,7 +501,7 @@ cpybabel-compile: FORCE
$(PYBABEL) compile -d $${class}translations; \
done
#\
#\
# Alternative solution that uses the hawat-cli utility:
# APP_ROOT_PATH=$(shell realpath ./chroot) hawat-cli intl init $(INIT_LOCALE)
#
......@@ -593,6 +595,11 @@ test:
@echo "Python version: `$(PYTHON) --version`"
APP_ROOT_PATH=$(shell realpath ./chroot) PYTHONPATH=$(DIR_LIB) $(NOSETESTS)
coverage:
@echo "\n$(GREEN)*** Checking test code coverage with nosetests and coverage ***$(NC)\n"
@echo "Python version: `$(PYTHON) --version`"
APP_ROOT_PATH=$(shell realpath ./chroot) PYTHONPATH=$(DIR_LIB) $(COVERAGE) run -m nose
#-------------------------------------------------------------------------------
......
setuptools==41.6.0
wheel==0.33.6
nose==1.3.7
coverage==5.0.3
pyflakes==2.1.1
pylint==2.4.3
sphinx==2.2.1
......
setuptools
wheel
nose
coverage
pyflakes
pylint
sphinx
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment