From 1b6edbdcf772fc7cd64b865946b71aaa2fcd8201 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alex=20Gr=C3=B6nholm?= Date: Sat, 6 Jun 2020 15:47:49 +0300 Subject: [PATCH] Fixed coverage calculation Doing this with the pytest plugin causes a lot of lines to be missed. --- setup.cfg | 3 +-- tox.ini | 5 ++++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/setup.cfg b/setup.cfg index 0560ca57..d301a808 100644 --- a/setup.cfg +++ b/setup.cfg @@ -33,7 +33,6 @@ typeguard = py.typed [options.extras_require] test = pytest - pytest-cov typing_extensions doc = sphinx_rtd_theme @@ -44,7 +43,7 @@ pytest11 = typeguard = typeguard.pytest_plugin [tool:pytest] -addopts = -rsx --cov --tb=short +addopts = -rsx --tb=short testpaths = tests [coverage:run] diff --git a/tox.ini b/tox.ini index 98f078e3..82b571f7 100644 --- a/tox.ini +++ b/tox.ini @@ -6,7 +6,10 @@ isolated_build = true [testenv] extras = test -commands = python -m pytest {posargs} +deps = coverage +commands = + coverage run -m pytest {posargs} + coverage report [testenv:flake8] deps = flake8