Code coverage

This commit is contained in:
Éloi Rivard 2020-08-19 09:18:38 +02:00
parent ff8bd12aaf
commit eab7891751
4 changed files with 30 additions and 3 deletions

3
.gitignore vendored
View file

@ -7,3 +7,6 @@ env
.python_history
config.toml
.tox
.coverage
.coverage.*
htmlcov

View file

@ -27,3 +27,8 @@ python38:
image: python:3.8
stage: test
script: tox -e py38
coverage:
image: python:3.8
stage: test
script: tox -e coverage

View file

@ -3,6 +3,4 @@ flask
flask-babel
flask-wtf
python-ldap
pytest
toml
pdbpp

View file

@ -3,9 +3,30 @@ envlist =
py36
py37
py38
coverage
skipsdist=True
[testenv]
install_command = pip install {packages}
commands = {envbindir}/pytest --showlocals --full-trace {posargs}
deps = --requirement requirements.txt
deps =
pytest
pdbpp
--requirement requirements.txt
[testenv:coverage]
skip_install = true
deps =
pdbpp
pytest
pytest-coverage
--requirement requirements.txt
commands =
{envbindir}/pytest --cov {posargs}
coverage html
[coverage:run]
source =
web
tests