On Thu, Sep 4, 2008 at 11:13 PM, Peter Bengtsson <[EMAIL PROTECTED]> wrote:
>
> From http://www.djangoproject.com/documentation/testing/
> "4. Looking for unit tests and doctests in the models.py and tests.py
> files in each installed application."
>
> Next to models.py I have forms.py which does exactly what the filename
> suggests: it defines forms. I've put some doctests in these classes.
> How do I get the testrunner to discover them?

Hi Peter,

The short answer is "it wont". The default test runner only looks in
models.py and tests.py.

However, if you want to put your tests somewhere else (such as in
forms.py), you can define your own test runner which implements its
own test discovery strategy. This is documented:

http://docs.djangoproject.com/en/dev/topics/testing/#using-different-testing-frameworks

If your looking for an example to follow, the code for
django.test.simple isn't too hard to tear apart and customize for your
own purposes.

Yours,
Russ Magee %-)

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" 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-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to