#16817 closed Cleanup/optimization (fixed)
Add a guide on code coverage to contributing docs
| Reported by: | Julien Phalip | Owned by: | Pedro Lima |
|---|---|---|---|
| Component: | Documentation | Version: | 1.3 |
| Severity: | Normal | Keywords: | |
| Cc: | preston@…, Pedro Lima | Triage Stage: | Accepted |
| Has patch: | yes | Needs documentation: | no |
| Needs tests: | no | Patch needs improvement: | yes |
| Easy pickings: | yes | UI/UX: | no |
Description
Increasing code coverage is a good place to start for new contributors to get acquainted both with the Django codebase and with its test suite. Python core has a nice guide for it [1] and it'd be useful for Django to have one too. The guide would explain how to install the coverage.py module, run it on top of the runtests script, generate the reports, etc.:
$ coverage run ./runtests.py --settings=test_sqlite $ coverage html
Some embedded third-party modules should be excluded so as to not mess up the results. This exclusion would be facilitated by adding a configuration file to django/tests/ (see attachment).
It would also be useful to have a regularly-updated online report that one could easily refer to. There's already one on the CI server [2], which is a great start, although it is using Cobertura instead of coverage.py.
[1] http://docs.python.org/devguide/coverage.html
[2] http://ci.django-cms.org/job/Django%20Coverage/cobertura
Attachments (1)
Change History (11)
by , 14 years ago
| Attachment: | 16817.runtests-coverage.diff added |
|---|
comment:1 by , 14 years ago
| Triage Stage: | Unreviewed → Accepted |
|---|
comment:2 by , 14 years ago
| Cc: | added |
|---|
comment:3 by , 14 years ago
| Easy pickings: | set |
|---|---|
| Has patch: | set |
| Patch needs improvement: | set |
Related ticket: #4501
comment:4 by , 14 years ago
| Owner: | changed from to |
|---|---|
| Status: | new → assigned |
comment:5 by , 14 years ago
| Owner: | removed |
|---|---|
| Status: | assigned → new |
comment:6 by , 13 years ago
| Owner: | set to |
|---|---|
| Status: | new → assigned |
comment:7 by , 13 years ago
| Cc: | added |
|---|---|
| Triage Stage: | Accepted → Ready for checkin |
Included this patch and added documentation for coverage installation and use (also based on the documentation work of krzysiumed in #4501)
comment:8 by , 13 years ago
| Triage Stage: | Ready for checkin → Accepted |
|---|
comment:9 by , 13 years ago
| Resolution: | → fixed |
|---|---|
| Status: | assigned → closed |
Coverage.py conf file to make the process easier