A Simple Continuous Test Script in Python

I was working on an in-memory database prototype in python and decided I didn’t want to keep manually running the unit tests so I whipped up a little auto test script that I can run in another terminal.

autotest.py

It’s very simple it relies on a static list of files and an internal cache of the last modified time via stat(). The tests are implemented using standard pyunit. Any time a test or implementation file is written to disk it re-runs the tests. If you’ve never had a tool like this give it a try and I think you’ll find that it’s an enjoyable way to work.

This entry was posted in programming, python. Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>