Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 0f01240

Browse files
author
Oliver Sauder
committed
Integrate coverage with pytest-cov
1 parent fbd235b commit 0f01240

File tree

4 files changed

+11
-1
lines changed

4 files changed

+11
-1
lines changed

‎.gitignore‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,9 @@ pip-delete-this-directory.txt
3232
# PyTest cache
3333
.pytest_cache/
3434

35+
# Coverage
36+
.coverage
37+
3538
# Tox
3639
.tox/
3740
.cache/

‎setup.cfg‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,3 +22,9 @@ known_standard_library = mock
2222
line_length = 100
2323
multi_line_output = 3
2424
skip_glob=*migrations*
25+
26+
[coverage:report]
27+
omit=
28+
.tox/*
29+
.eggs/*
30+
show_missing = True

‎setup.py‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,7 @@ def get_package_data(package):
108108
'factory-boy',
109109
'pytest-django',
110110
'pytest',
111+
'pytest-cov',
111112
'django-polymorphic>=2.0',
112113
'packaging',
113114
'django-debug-toolbar'

‎tox.ini‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ setenv =
1515
DJANGO_SETTINGS_MODULE=example.settings.test
1616

1717
commands =
18-
python setup.py test {posargs}
18+
python setup.py test --addopts '--cov --no-cov-on-fail'{posargs}
1919

2020
[testenv:flake8]
2121
deps = flake8

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /