From db0114bf16ffbf88cd98c89f5fdc63775f8a9076 Mon Sep 17 00:00:00 2001 From: Renaud Boyer Date: Sat, 5 Dec 2020 15:00:56 +0100 Subject: [PATCH] setup pytest-cov --- .gitignore | 4 +++- pyproject.toml | 9 +++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 06cac594..1ed93234 100644 --- a/.gitignore +++ b/.gitignore @@ -12,4 +12,6 @@ static/upload adhoc_* adhoc.py venv/ -.venv \ No newline at end of file +.venv +.coverage +htmlcov diff --git a/pyproject.toml b/pyproject.toml index dff914fe..425ab381 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -80,7 +80,16 @@ py3-validate-email = "^0.2.10" pytest = "^6.1.0" black = "^20.8b1" pre-commit = "^2.7.1" +pytest-cov = "^2.10.1" [build-system] requires = ["poetry>=0.12"] build-backend = "poetry.masonry.api" + +[tool.pytest.ini_options] +addopts = """ + --cov=. + --cov-report=term:skip-covered + --cov-report=html:htmlcov + --cov-fail-under=60 +"""