[TIP] Fwd: An OO API for doctest / unittest integration...

Michał Kwiatkowski constant.beta at gmail.com
Fri Aug 15 13:57:30 PDT 2008


2008/8/15 Olemis Lang <olemis at gmail.com>:
>  >  Is there a similar way to execute those doctests via dutest, so I can
>  >  check out its new features?
>
> I prefer you to read the article (see the links below), because there
>  is comprehensive documentation and examples there...

I skimmed through it and on page 47 there's code looking like this:

import dutest

if __name__ == "__main__":
    dutest.main()

That clearly doesn't work giving me an exception:

    AttributeError: 'module' object has no attribute 'main'

>  If you checked out the whole package (the trunk) using SVN... you can
> take a look at the initialization of the default test
>  loader employed in oop.test.test_oopdbc module...
>
>  It looks something like this...

Isn't there a simpler way, like the one I cited for doctest?

>  >  And another thing. You reference the article "Doctest and unittest…
>  >  now they'll live happily forever". Is it available somewhere online?
>
> Yes... take a look at TPP site [1]... you can download it directly from [2]

Thank you. I'll read through it during the weekend.

Cheers,
mk


More information about the testing-in-python mailing list