Skip to content

Commit 47caebe

Browse files
author
Hugo Osvaldo Barrera
committed
Simplify coverage handling
- Always install coverage tools. - Show coverage if all tests pass. - Less conditional code.
1 parent 3eb9ce5 commit 47caebe

File tree

3 files changed

+7
-6
lines changed

3 files changed

+7
-6
lines changed

Makefile

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,6 @@ PYTEST_ARGS =
3030

3131
TEST_EXTRA_PACKAGES =
3232

33-
ifeq ($(COVERAGE), true)
34-
TEST_EXTRA_PACKAGES += pytest-cov
35-
PYTEST_ARGS += --cov-config .coveragerc --cov vdirsyncer
36-
endif
37-
3833
ifeq ($(ETESYNC_TESTS), true)
3934
TEST_EXTRA_PACKAGES += git+https://github.com/etesync/[email protected]
4035
TEST_EXTRA_PACKAGES += django djangorestframework==3.8.2 wsgi_intercept drf-nested-routers

setup.cfg

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,12 @@ universal = 1
33

44
[tool:pytest]
55
norecursedirs = tests/storage/servers/*
6-
addopts = --tb=short
6+
addopts =
7+
--tb=short
8+
--cov-config .coveragerc
9+
--cov=vdirsyncer
10+
--cov-report=term-missing
11+
--no-cov-on-fail
712

813
[flake8]
914
# E731: Use a def instead of lambda expr

test-requirements.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
hypothesis>=5.0.0
22
pytest
3+
pytest-cov
34
pytest-localserver
45
pytest-subtesthack

0 commit comments

Comments
 (0)