mirror of
https://github.com/samsonjs/vdirsyncer.git
synced 2026-03-25 08:55:50 +00:00
Simplify coverage handling
- Always install coverage tools. - Show coverage if all tests pass. - Less conditional code.
This commit is contained in:
parent
3eb9ce5ae4
commit
47caebe843
3 changed files with 7 additions and 6 deletions
5
Makefile
5
Makefile
|
|
@ -30,11 +30,6 @@ PYTEST_ARGS =
|
||||||
|
|
||||||
TEST_EXTRA_PACKAGES =
|
TEST_EXTRA_PACKAGES =
|
||||||
|
|
||||||
ifeq ($(COVERAGE), true)
|
|
||||||
TEST_EXTRA_PACKAGES += pytest-cov
|
|
||||||
PYTEST_ARGS += --cov-config .coveragerc --cov vdirsyncer
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifeq ($(ETESYNC_TESTS), true)
|
ifeq ($(ETESYNC_TESTS), true)
|
||||||
TEST_EXTRA_PACKAGES += git+https://github.com/etesync/journal-manager@v0.5.2
|
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
|
TEST_EXTRA_PACKAGES += django djangorestframework==3.8.2 wsgi_intercept drf-nested-routers
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,12 @@ universal = 1
|
||||||
|
|
||||||
[tool:pytest]
|
[tool:pytest]
|
||||||
norecursedirs = tests/storage/servers/*
|
norecursedirs = tests/storage/servers/*
|
||||||
addopts = --tb=short
|
addopts =
|
||||||
|
--tb=short
|
||||||
|
--cov-config .coveragerc
|
||||||
|
--cov=vdirsyncer
|
||||||
|
--cov-report=term-missing
|
||||||
|
--no-cov-on-fail
|
||||||
|
|
||||||
[flake8]
|
[flake8]
|
||||||
# E731: Use a def instead of lambda expr
|
# E731: Use a def instead of lambda expr
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
hypothesis>=5.0.0
|
hypothesis>=5.0.0
|
||||||
pytest
|
pytest
|
||||||
|
pytest-cov
|
||||||
pytest-localserver
|
pytest-localserver
|
||||||
pytest-subtesthack
|
pytest-subtesthack
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue