[BangPypers] Testing for documentation as a release criterion

Srijayanth Sridhar srijayanth at gmail.com
Thu Jun 18 11:54:40 CEST 2009


I am currently thinking about enforcing the following standard for a small
demo project that might evolve into something larger pending approval(which
was why the request for training programmes).

Every module, every class and every function should have documentation. To
enforce this, I write a unit test that basically does something as follows:

undocumented = [obj for obj in dir(module) if obj.__doc__ == None]
assertEqual (undocumented, [])

Of course, I'd have to make it recursive for all classes defined in module
etc. I just wanted to know what people thought of this and whether somebody
else has experiences with such a standard being enforced and what they think
the pros/cons might be?

Thank you,

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/bangpypers/attachments/20090618/f7b89fc0/attachment.htm>

More information about the BangPypers mailing list