On 8/4/06, Bill de hÓra <[EMAIL PROTECTED]> wrote:

Hi,

is there any particular reason unittest isn't used in Django?
Specifically if I was writing tests for contribution/patches, would
writing them in unittest be a problem, or is there a preferred approach?

I might be wrong on this, but I think the reason is mostly historical.

The modeltests directory is used to populate the example models documentation ( http://www.djangoproject.com/documentation/models/) as well as being a testing procedure.
 
When the regression tests folder was created, it just followed the pattern established by modeltests.

In addition, the 'runtests' script that was added as part of the modeltests framework was customized to finding and executing doctests; nobody every sat down and extended it to find and run unittests.

The testing patches that are currently in preparation (#2333) would allow unittest or doctest to be used for internal django tests and for end-user tests. Modeltests will remain as doctests for documentation purposes, but the regressiontests can be (and in the case of some of the othertests, are) ported to unittest, and the runtest script has been genericized to find and run both unittest and doctests.

Yours,
Russ Magee %-)

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Django developers" 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-developers
-~----------~----~----~----~------~----~------~--~---

Reply via email to