Re: Django's doctest clashes with coverage.py

2007-11-25 Thread Ned Batchelder
You're quite welcome. One other thing I forgot to mention: nosetest.py has a --with-coverage option, and Django support. I've used it to coverage test my Django code. --Ned. Marcin Kaszynski wrote: > > On Nov 25, 3:58 am, "Russell Keith-Magee" <[EMAIL PROTECTED]> > wrote: > >> We recently

Re: Django's doctest clashes with coverage.py

2007-11-25 Thread Marcin Kaszynski
On Nov 25, 3:58 am, "Russell Keith-Magee" <[EMAIL PROTECTED]> wrote: > We recently added the > ability for external projects to define new management commands > specifically so that end-users could contribute features like this > without the need to modify the Django core. I did not know that.

Re: Django's doctest clashes with coverage.py

2007-11-24 Thread Ned Batchelder
Please use coverage.py, I would be honored to have it included in Django core. If it's better as an add-on of some sort, that's great too. Let a thousand flowers bloom! --Ned. Todd O'Bryan wrote: > On Nov 24, 2007 9:58 PM, Russell Keith-Magee <[EMAIL PROTECTED]> wrote: > > >> If the

Re: Django's doctest clashes with coverage.py

2007-11-24 Thread Todd O'Bryan
On Nov 24, 2007 9:58 PM, Russell Keith-Magee <[EMAIL PROTECTED]> wrote: > If the licensing issue can't be resolved, it may be worth starting a > standalone project to handle coverage tests. We recently added the > ability for external projects to define new management commands > specifically so

Re: Django's doctest clashes with coverage.py

2007-11-24 Thread Empty
I could be off base here but in regards to the the execution of translation initialization I believe that is occurring because the django.core.management.base attempts to switch the translation to english if the can_import_settings attribute is set: if self.can_import_settings: from

Re: Django's doctest clashes with coverage.py

2007-11-24 Thread Russell Keith-Magee
On 11/24/07, Marcin Kaszynski <[EMAIL PROTECTED]> wrote: > > On Nov 24, 3:54 am, "Russell Keith-Magee" <[EMAIL PROTECTED]> > wrote: > > As a side note, there is an existing ticket requesting that we add > > coverage support to Django's test system; any suggestions in this area > > are welcome. >

Re: Django's doctest clashes with coverage.py

2007-11-24 Thread Marcin Kaszynski
One more comment after a day of writing unit tests: installing coverage.py via a test runner is not a good idea. The test runner is executed pretty late and there is a chance that part of your code gets executed earlier. I do not know if this is the only possible case, but I had the code in

Re: Django's doctest clashes with coverage.py

2007-11-24 Thread Marcin Kaszynski
On Nov 24, 3:54 am, "Russell Keith-Magee" <[EMAIL PROTECTED]> wrote: > > I tried to file this as a ticket, but trac kept rejecting it as spam > Have you tried creating a login: > > http://code.djangoproject.com/settings I did have the idea of creating one, but simply could not find the page --

Django's doctest clashes with coverage.py

2007-11-23 Thread Marcin Kaszynski
Hi, I tried to file this as a ticket, but trac kept rejecting it as spam even after I removed all the links and changed contents. I'm posting it here because others might find it useful too. When you use coverage.py in "manage.py test" it incorrectly reports some statements as not executed.