Found out that putting them to tests.py *does* run them, but since
when all is "ok" it won't print anything... But nevertheless I
wouldn't like to put them root, and inside "if __name__ ==
'__main__':", manage.py test myapp wont find them.

On Apr 23, 8:11 pm, Jari Pennanen <jari.penna...@gmail.com> wrote:
> Hi!
>
> I'm just wondering the same thing, not exact same, but this:
>
> How do I run doctests when doing "./manage.py test myapp", where
> should I define doctest.testmod(...) lines? In root of tests.py it
> doesn't work.
>
> On Apr 12, 7:51 pm, Julian <maili...@julianmoritz.de> wrote:
>
> > hello,
>
> > I am testing some of my filters with doctests. it's very easy, but I
> > have to call the module with the filters manually:
>
> > python /foo/bar/templatetags/eggs_extra.py -v
>
> > to let the doctest run.
>
> > Now I've added at the end of the egg.py the following code:
>
> > def run_doctest():
> >     import doctest
> >     doctest.testmod()
>
> > and at the beginning of the tests.py the following:
>
> > from foo/bar/templatetags/eggs_extra.py import run_doctest
>
> > run_doctest()
>
> > but nothing happens.
>
> > what can I do that that the doctests in the template filters are run
> > with ./manage.py test?
>
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to