Art of Unit Testing

Michael Hudson mwh at python.net
Fri Aug 5 07:32:43 EDT 2005


"Terry Reedy" <tjreedy at udel.edu> writes:

> "Paul Rubin" <"http://phr.cx"@NOSPAM.invalid> wrote in message 
> news:7xpssu8hzw.fsf at ruckus.brouhaha.com...
>> I knew there was some other one before unittest came along but I thought
>> unittest was supposed to replace the older stuff.
>
> I believe unittest was an alternative rather than replacement for doctest.

Around the time pyunit got added to the stdlib (as unittest) there
were some other candidates (one written by AMK et al at the MEMS
Exchange -- Sancho or something like that?), and pyunit got chosen by
the python-dev cabal, for reasons I don't recall now.  It's probably
in the archives.

>> What's the preferred one, Pythonically speaking?
>
> py.test was written, apparently, by pypy folks to replace unittest for pypy 
> testing.  

That is a teeny bit inaccurate -- it's mostly Holger Krekel's work,
though his work on pypy was quite a lot of the inspiration.  Armin
Rigo helped a lot, the other PyPy people less so, on average.

> To me, it is more Pythonic in spirit, and I plan to try it for an
> upcoming TDD project.

It's very cool, indeed.

Cheers,
mwh

-- 
  Darn!  I've only got 10 minutes left to get falling-down drunk!  I
  suppose I'll have to smoke crack instead now.
                     -- Tim Peters is checking things in on 2002-12-31



More information about the Python-list mailing list