File tree 4 files changed +31
-8
lines changed
4 files changed +31
-8
lines changed Original file line number Diff line number Diff line change
1
+ comment :
2
+ layout : " diff, files"
Original file line number Diff line number Diff line change 1
1
[run]
2
+ branch = true
3
+ source = .
2
4
omit =
3
5
*/**/migrations/*
6
+ */**/management/commands/*
7
+ */**/settings/*
8
+ */**/settings.py
9
+ analytics/vendor/*
10
+ rtd_tests/*
11
+ */**/tests/**
12
+ wsgi.py
13
+
14
+ [report]
15
+ exclude_lines =
16
+ if self.debug:
17
+ pragma: no cover
18
+ raise NotImplementedError
19
+ if __name__ == .__main__.:
Original file line number Diff line number Diff line change @@ -5,6 +5,7 @@ pytest==3.7.4
5
5
pytest-django==3.4.2
6
6
pytest-describe==0.11.1
7
7
pytest-xdist==1.23.0
8
+ pytest-cov
8
9
apipkg==1.5
9
10
execnet==1.5.0
10
11
Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ skipsdist = True
6
6
[travis]
7
7
python =
8
8
2.7: py27
9
- 3.6: py36
9
+ 3.6: py36, codecov
10
10
11
11
[testenv]
12
12
description = run test suite for the application with {basepython}
@@ -16,10 +16,11 @@ setenv =
16
16
LANG =C
17
17
LC_CTYPE =C.UTF-8
18
18
DJANGO_SETTINGS_SKIP_LOCAL =True
19
+ passenv = CI TRAVIS TRAVIS_*
19
20
deps = -r{toxinidir}/requirements/testing.txt
20
21
changedir = {toxinidir}/readthedocs
21
22
commands =
22
- py.test {posargs}
23
+ py.test -- cov-report = --cov-config {toxinidir}/.coveragerc -- cov =. {posargs}
23
24
24
25
[testenv:docs]
25
26
description = build readthedocs documentation
@@ -53,12 +54,15 @@ commands =
53
54
npm run lint
54
55
55
56
[testenv:coverage]
56
- description = run test suite with code coverage for the application with {basepython}
57
- deps =
58
- -r{toxinidir}/requirements/testing.txt
59
- pytest-cov
57
+ description = shows the coverage report
58
+ deps = coverage
60
59
whitelist_externals = echo
61
60
commands =
62
- py.test --disable-pytest-warnings \
63
- --cov-report=term --cov-report= html --cov-config {toxinidir}/.coveragerc --cov=. {posargs}
61
+ coverage report --show-missing
62
+ coverage html
64
63
echo Annotated HTML coverage report is in {toxinidir}/readthedocs/htmlcov/index.html
64
+
65
+ [testenv:codecov]
66
+ description = upload coverage report
67
+ deps = codecov
68
+ commands = codecov
You can’t perform that action at this time.
0 commit comments