PEP: Procedure for Adding New Modules (please comment)

Paul Winkler slinkp23 at yahoo.com
Mon Jul 9 17:04:28 EDT 2001


Fredrik Lundh wrote:
> 
> Paul Winkler wrote:
> > I think test suites would be a very, very good idea. At a minimum, some doctest
> > examples. Even better would be a well-defined suite of unit tests using the
> > unittest module.
> 
> if you think tests using one support module is automatically better
> than tests using another support module, you have a lot to learn
> about testing...
> 
> </F>

Sorry, I didn't say what I meant.
I don't really care _how_ testing is done.

I also should not have implied that the existing library is not adequately
tested; I have no basis for thinking that.

I based my suggestion (doctest at minimum, preferably unittest) on the note at
the end of the documentation for doctest:

"""
The first word in doctest is "doc", and that's why the author wrote doctest: to
keep documentation up to date. It so happens that doctest makes a pleasant
unit testing environment, but that's not its primary purpose. 

Choose docstring examples with care. There's an art to this that needs to be
learned -- it may not be natural at first. Examples should add genuine value
to the documentation. ...
"""

So for more thorough testing of things that don't belong in the documentation, I
thought unittest.py might be a worthy candidate. After all, that's what it's
designed for, and it's already in the standard library.

I should have said "Yes, testing is a good idea, let's have some standards for
that", and then I should have shut my mouth.

-- 
...................    paul winkler   ....................
custom calendars & printing: http://www.calendargalaxy.com
       A member of ARMS:   http://www.reacharms.com
            home page:  http://www.slinkp.com



More information about the Python-list mailing list