On Tue, 2006-07-04 at 08:05 -0700, jws wrote:
> > They should be added, since we are bound to get some edge cases wrong
> > (c.f. initial SQL parsing) and having regression tests will help there.
> > If you could add those, that would be great. Testing both sorts of
> > quotes, backslashes, semicolons and percentage signs would be my
> > suggestion for a start. What other characters might we screw up?
> > Anything that is dangerous for any database or that we might be using as
> > a replacement hook is a candidate.
> 
> There doesn't seem to be any document regarding how to write
> appropriate and useful tests. That would be helpful to a casual
> contributor like me. My 'testing' framework is pure duct-tape. I can
> root through the existing code, but some guidance would make it easier
> to do the right thing.

The existing setup is simple enough that following existing examples is
really the way to go.

If your tests can provide information as examples (such as, how this
might be used in practice), then they should go under tests/modeltests/
(pick an appropriate directory... probably will be able to fit under
something already there). Just add command line examples of usage and
docstring that explain it. Bear in mind that things under this directory
make it to the model examples page on the website, so it should be clear
what is going on.

If the tests are purely "regression test" in nature -- adding no real
clarification -- then tests/regressiontests/ is a good location. These
tests do not get used as examples and can be a bit more boring and
trying out corner cases. If you need to create a new directory under
regressiontests/, just be aware that it cannot have the same name as any
directory under modeltests/.

It might even be that we need things in both areas: an example or two
and then some regression cases.

Regards,
Malcolm


--~--~---------~--~----~------------~-------~--~----~
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