Simplify coverage handling

- Always install coverage tools.
- Show coverage if all tests pass.
- Less conditional code.
This commit is contained in:
Hugo Osvaldo Barrera 2020-06-09 14:57:58 +02:00
parent 3eb9ce5ae4
commit 47caebe843
3 changed files with 7 additions and 6 deletions

View file

@ -30,11 +30,6 @@ PYTEST_ARGS =
TEST_EXTRA_PACKAGES =
ifeq ($(COVERAGE), true)
TEST_EXTRA_PACKAGES += pytest-cov
PYTEST_ARGS += --cov-config .coveragerc --cov vdirsyncer
endif
ifeq ($(ETESYNC_TESTS), true)
TEST_EXTRA_PACKAGES += git+https://github.com/etesync/journal-manager@v0.5.2
TEST_EXTRA_PACKAGES += django djangorestframework==3.8.2 wsgi_intercept drf-nested-routers

View file

@ -3,7 +3,12 @@ universal = 1
[tool:pytest]
norecursedirs = tests/storage/servers/*
addopts = --tb=short
addopts =
--tb=short
--cov-config .coveragerc
--cov=vdirsyncer
--cov-report=term-missing
--no-cov-on-fail
[flake8]
# E731: Use a def instead of lambda expr

View file

@ -1,4 +1,5 @@
hypothesis>=5.0.0
pytest
pytest-cov
pytest-localserver
pytest-subtesthack