Tuesday, March 8, 2016

Refactoring And Testing With Doctest

"If you can't test it, don't build it. If you don't test it, rip it out."
Boris Beizer

Python comes with a variety of testing frameworks which are dead simple to use. You really have no excuse not to test your code as you're writing it.

I've put together a short video where you get to look over my shoulder as I refactor the FizzBuzz program. Even though this problem is completely artificial, it still has enough complexity to make refactoring a worthwhile exercise.


No comments:

Post a Comment