Poll Results: test frameworks

Well, the poll I put up a couple weeks ago has 125 votes last I checked.

Results

  1. nose, 42 votes
  2. pytest, 32 votes
  3. unittest, 29 votes
  4. doctest, 18 votes
  5. other, 4 votes

The other votes were:

  • twisted trial (also mentioned in a comment)
  • pyVows
  • attest
  • zope.testing

Commentary

This is mostly what I expected.

So I think I’m on the right track.
I started with a doctest intro. To be frank, I did that first because I wasn’t really excited about it. But I have to say that I was surprised how useful it doctest really is. It’s also the oddball of test frameworks.

The next framework I will cover is unittest, as it is the other test framework that comes with most python installations. Also, lots of other tools use or build off of unittest, so it really needs to be covered soon.

Nose and pytest both can run unittest and doctest style tests. They can also run tests much like unittest, but without the need for a class structure or special assert statements.

In was going to cover pytest before nose, but I think I’ll switch the order due to to poll results.

I don’t think I’ll cover attest or pyVows right away, if ever. I actually just don’t get how they would be more useful than the above test framework arsenal. But I’m also not ruling them out either.

The newcomer that surprised me was twisted trial. I’d never heard of it before the poll. It sounds quite cool in its own right, even if one isn’t using twisted. So I hope to cover trial after nose and pytest. I’m especially interested in the real time option, as some of my tests can run for a long time.

I’m going to just scrape the surface of each at first, much like the doctest intro. However, I plan on revisiting each later and exploring the cool features each of them have to offer.

Thanks to everyone who participated in the poll.

If you haven’t yet, it shuts off at 200 votes, so there is still time.

Leave a Reply