sal wrote:
> Hello all.
> I've been using the built in django testing framework for my code. But
> as I add more and more tests, I'm finding the standard behavior of
> only looking for tests in models.py and tests.py to be a little
> unwieldy. I'd prefer to organize my tests in separate files.
At first I said to myself, "It doesn't already?"

But I forgot that pretty much the very first thing I did was write my 
"tests.py" to pull from a directory (and in fact I have one layer of 
indirection too many, now that I look at this), so I'd forgotten that it 
works that way.

You just need a "tests" module that when imported contains all the tests 
you want. It's just like the 'models.py' file that way. You should even 
be able to make "tests" a subdirectory with an __init__.py file that 
loads all the tests in you want (a standard directory-based Python 
module). You don't really need special support per se.


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To post to this group, send email to django-developers@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to