ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> python-list
python-list
Re: doctest or pyunit?
by Fredrik Lundh other posts by this author
May 2 2001 11:55PM messages near this date
RE: doctest or pyunit? | detect terminal width
Bruce Edge wrote:
>  Is doctest going to be updated to use 2.1's method attributes rather than
>  the doc string?

given that doctest is designed to make sure your *documentation*
is correct, that sounds like a really lousy idea ;-)

but it works well for unit-testing too: write a test program that
exercises relevant parts of your module, and use doctest to make
sure *that* program works as expected.

in my experience (having tried pyunit, several homebrewn frameworks,
including ports of the original smalltalk framework, greg's unittest, and
doctest), using doctest on test scripts beats all other approaches.
less code, less work, easier to debug the tests.  ymmv, as usual.

Cheers /F

<!-- (the eff-bot guide to) the standard python library:
http://www.pythonware.com/people/fredrik/librarybook.htm
     (electronic edition now available from amazon.com!)
--> 


-- 
http://mail.python.org/mailman/listinfo/python-list
Thread:
Bruce Edge
Alex Martelli
Tim Peters
Fredrik Lundh

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved