(Naturally, I'd run the program afterwards to make sure it really worked - but if it didn't, I could just consider that a bug in the tests, write the test, fix the code, and close the bug. Everybody likes closing bugs, so there's the reward...)
Doctest is great too, since it's pretty common to use the Python interpreter as the first indication that your code works. Then you just paste the session transcript into the docstring, and you're done.