Falling In Love With Doctests and Unittests

by Noah Gift

At our last PyAtl meeting we talked about Testing. I did a short presentation on Doctests, and Toby Ho did a talk on Test Driven Development and Behavioral Driven Development in Python.

I got inspired and stayed up until 4 AM on Friday/Saturday morning writing tests for the deduplication tool I am working on,Liten. You can grab a copy of it from the cheeshop as well. As a result, there is now version 0.1.2, which has pretty much full, doctest, and, unittest ,coverage. I also added the ability to search by bytes, KB, MB, GB, and TB and a --quiet option. I think I am test infected now.

I am also getting excited about this project. I hope to get the reporting a lot nicer in the next month when I release 0.1.3. I also am mulling over the best caching system to use, as I am not completely sure if I want to cache previous searches via a shelve or an ORM with sqlite. It looks like, I will probably have a deletion mechanism ready in 0.1.3 too.