Follow @RoyOsherove on Twitter

lowering the adoption barrier for unit testing: doctest in python

One area that I didn’t know about was brought to me by an attendee in one of the conferences I was in. It’s a simple idea, really: write the tests for a method as part of the method’s documentation. but make them executable.

In python, they have something called doctest (thanks to Alf Lervåg for the emails!)

here’s a PDF with more in.

 

With the upcoming WPF editor in VS 2010, we could find a good use for such a thing. I think it might ease adoption of unit testing becuase it’s much easier to accomplish if you can write the test right there where the method you’re writing is. The cons are lack of intellisense, compilation errors and such, but it’s something to look at, indeed.

TDD Case Studies and research

Isolation frameworks – lessons from the wild