From b1488dfd4d4a4f116e7bf575824ca225a727b07f Mon Sep 17 00:00:00 2001 From: Nils Philippsen Date: Jul 30 2021 11:20:38 +0000 Subject: Enable the pytest coverage plugin Signed-off-by: Nils Philippsen --- diff --git a/.coveragerc b/.coveragerc new file mode 100644 index 0000000..b4750b1 --- /dev/null +++ b/.coveragerc @@ -0,0 +1,12 @@ +[run] +branch = True +source = countme +omit = countme/version.py + +[report] +precision = 2 +#fail_under = 99 +exclude_lines = + pragma: no cover + def __repr__ +show_missing = True diff --git a/setup.cfg b/setup.cfg index 8e1fbf5..3868e88 100644 --- a/setup.cfg +++ b/setup.cfg @@ -28,3 +28,6 @@ scripts = [options.extras_require] # Not sure what the _minimum_ tqdm version is but this should be fine fancy_progress = tqdm>=4.10.0 + +[tool:pytest] +addopts = --cov-config .coveragerc --cov=countme --cov-report term --cov-report xml --cov-report html diff --git a/test_requirements.txt b/test_requirements.txt index 3329503..15ff12a 100644 --- a/test_requirements.txt +++ b/test_requirements.txt @@ -1,4 +1,5 @@ flake8 black mypy -pytest \ No newline at end of file +pytest +pytest-cov