doctest, unittest, or if __name__='__main__'

lollipopenator at gmail.com lollipopenator at gmail.com
Mon Mar 27 21:28:29 EST 2006


Hi there Christopher, I was wondering if you (or anyone reading this )
could quickly summarize the ways in which unittest is unpythonic, or
point me to somewhere which discusses this.

Is this 'consensus opinion' or mainly your own opinion?

Is there a summary somewhere (in addition to  the Zen of Python thingy)
of what kinds of things are 'pythonic' and why they are considered so?
I see it referred to a lot, and am starting to get a feel for it in
some areas but not others.

I am fairly newbie-ish, having been actively working as a python
programmer for the last 6 months, although I did first learn the basics
several years ago.


 I have noticed some distinctly funny and confused feelings I get when
using the unittest module, stuff that feels clunky and odd about how it
is set-up, however I thought that this was just  due to *my personal*
lack of understanding of the deep magic and sophisticated design
patterns used in this module!

If it turns out to be 'unpythonic' then I can blame the funny feelings
on that and sigh in a smug and vaguely superior way whenever I get them
 ;)

I have not yet used the doctest module but would like to begin soon :)




I am also very interested in py.lib,  just looked at the website and
will be keeping an eye on it.

One of the things I am doing a lot of at the moment is documentation
and testing, hence the interest!

Wendy Langer




More information about the Python-list mailing list