[TIP] Getting started writing DocTests for Web applications
flavour at partyvibe.com
Mon Jan 19 00:44:39 PST 2009
Olemis Lang wrote:
> On Fri, Jan 16, 2009 at 2:49 AM, Fran Boon <flavour at partyvibe.com> wrote:
>> 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.
> Use doctest or dutest _ loaders and specify an HTML-aware output
> checker (e.g. lxml.doctestcompare.LHTMLOutputChecker _, _ ...)
> Perhaps there are different options out there ... Pls feel free to
> send us (the list ;) feedback about your research ...
Thanks for the pointer to your promising-looking program :)
- I've still had trouble getting started though ;)
Inspired by this post:
I am now looking at:
& using this with CherryPy's WebTest:
Comments on thsi apporoach welcomed :)
I'll report back when I've started to make real progress...
More information about the testing-in-python