[TIP] Getting started writing DocTests for Web applications

Fran Boon flavour at partyvibe.com
Thu Jan 15 23:49:03 PST 2009

I have started a project to rewrite Sahana in Python.

We have ambitious plans to do quality testing:

I'd like to start with doc tests as these make for inline docs for 
developers & can build automatic API docs using epydoc.

I'm having trouble getting started as examples look at nice clear 
mathematical operations whilst our functions mostly generate HTML.
Once there are a couple of examples to copy, this will make it easier to 
incorporate throughout.

For unit tests, there seem to be several good options such as WebUnit or 
CheeryPy's WebTest.

Once we have decent unit tests, then we can look at CI (either PQM or 
Bitten seem to fit our current architecture).

Assistance would be very welcomed - either help getting started or 
(ideally) someone who would wish to volunteer for this worthy cause :)

Many thanks,

More information about the testing-in-python mailing list