#4501: Coverage support for tests
----------------------------------------+-----------------------------------
Reporter: [email protected] | Owner: ericholscher
Status: new | Milestone: 1.2
Component: Testing framework | Version: SVN
Resolution: | Keywords: gsoc
Stage: Accepted | Has_patch: 0
Needs_docs: 1 | Needs_tests: 1
Needs_better_patch: 1 |
----------------------------------------+-----------------------------------
Comment (by ericholscher):
This approach has a couple of major points that need to be discussed
before merging.
First off, it turns the Default test runner into a class instead of a
function. This class then has the run_tests function on it. It would be
easy enough to not replace the default runner, and keep that as a
function. The different coverage runners could also be turned into
functions, however that would be a lot hackier, and in that case I think
that having it be class based is a big win. It also allows people to
override it and make a custom runner if they want, ex. for figleaf.
The other big point of contention is the way that modules are collected.
If you just run coverage.report() without passing in the modules to
include and exclude, you get an ugly traceback including core python. The
module_utils that are included here strike me as way too magical, and
should probably not go into core. That said, they do currently work for
what we need them to do.
Looking at how nose does this is probably what we want to copy, and it
looks easy enough:
http://somethingaboutorange.com/mrl/projects/nose/0.11.1/plugins/cover.html
I'll try and get this working today.
--
Ticket URL: <http://code.djangoproject.com/ticket/4501#comment:18>
Django <http://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/django-updates?hl=en.