Search The Blog
About this site

@RoyOsherove

Subscribe!

This site aims to connect all the dots of my online activities - from tools, books blogs and twitter accounts, to upcoming conferences, engagements and user group talks.

from 5whys.com
Twitter: @RoyOsherove
My Book: The Art of Unit Testing
Latest Posts
« TDD Case Studies and research | Main | Isolation frameworks – lessons from the wild »
Wednesday
Dec032008

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.

PrintView Printer Friendly Version

Reader Comments

There are no comments for this journal entry. To create a new comment, use the form below.

PostPost a New Comment

Enter your information below to add a new comment.

My response is on my own website »
Author Email (optional):
Author URL (optional):
Post:
 
Some HTML allowed: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <em> <i> <strike> <strong>