best python unit testing framwork

James Harris james.harris.1 at googlemail.com
Thu Nov 13 06:54:57 EST 2008


On 11 Nov, 22:59, Brendan Miller <catph... at catphive.net> wrote:
> What would heavy python unit testers say is the best framework?
>
> I've seen a few mentions that maybe the built in unittest framework
> isn't that great. I've heard a couple of good things about py.test and
> nose. Are there other options? Is there any kind of concensus about
> the best, or at least how they stack up to each other?

You don't mention what you want from testing so it's hard to say which
is "best" as it depends on one's point of view.

For example, I had a requirement to test more than just Python
programs. I wanted to test code written in any language. None of the
frameworks I found supported this so I wrote my own tester. It
interacts with programs via file streams - principally stdin, stdout
and stderr though others can be added as needed.

One nice by-product is that test code does not bloat-out the original
source which remains unchanged. And test cases can be written before,
alongside or after the code as desired.

So, YMMV.
--
James



More information about the Python-list mailing list