diff --git a/.coveragerc b/.coveragerc new file mode 100644 index 00000000..6deec938 --- /dev/null +++ b/.coveragerc @@ -0,0 +1,9 @@ +[run] +include = + src/** + +omit = + **/__init__.py + **/_version.py + src/dug/config.py + src/dug/hookspecs.py \ No newline at end of file diff --git a/Makefile b/Makefile index 170d70c4..65fa9442 100644 --- a/Makefile +++ b/Makefile @@ -6,6 +6,7 @@ DOCKER_OWNER = helxplatform DOCKER_APP = dug DOCKER_TAG = ${VERSION} DOCKER_IMAGE = ${DOCKER_OWNER}/${DOCKER_APP}:$(DOCKER_TAG) +export PYTHONPATH = $(shell echo ${PWD})/src .DEFAULT_GOAL = help @@ -27,13 +28,15 @@ clean: install: ${PYTHON} -m pip install --upgrade pip ${PYTHON} -m pip install -r requirements.txt - ${PYTHON} -m pip install . #test: Run all tests test: # ${PYTHON} -m flake8 src ${PYTHON} -m pytest --doctest-modules src - ${PYTHON} -m pytest tests + coverage run -m pytest tests + +coverage: + coverage report #build: Build Docker image build: