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 7d7d59d

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

File tree

4 files changed

+12
-2
lines changed

4 files changed

+12
-2
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: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,13 @@ deps =
99
django20: Django>=2.0,<2.1
1010
drf36: djangorestframework>=3.6.3,<3.7
1111
drf37: djangorestframework>=3.7.0,<3.8
12-
12+
passenv = TOXENV CI TRAVIS TRAVIS_*
1313
setenv =
1414
PYTHONPATH = {toxinidir}
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 によって変換されたページ (->オリジナル) /