[Tutor] assert() question

Dick Moores rdm at rcblue.com
Mon Jul 7 00:06:13 CEST 2008


At 02:30 PM 7/6/2008, Kent Johnson wrote:
>On Sun, Jul 6, 2008 at 2:49 AM, Dick Moores <rdm at rcblue.com> wrote:
> > I have a module, mycalc.py, which is a collection of functions designed to
> > be imported independently.
> >
> > I've heard about using assert() to check up on whether things are still
> > working correctly, or something like that. So I've begun to write some
> > assert() expressions(?)  and put them at the bottom of the module.
>
>You might be interested in the doctest module which lets you write
>tests similar to these integrated with the doctstrings for your
>functions.
>http://docs.python.org/lib/module-doctest.html

Thanks, Kent. Looks interesting. But I'll probably have some 
questions, as usual.

Dick




More information about the Tutor mailing list