/ Published in: Python
Test-first programming, in which you write the unit tests first with the unittest module and then work on the code until it passes all the tests, seems like a good substitute for writing interfaces or documentation first. The unit tests are like an API, describing the interface of the code being tested. And they lend themselves well to refactoring.
This is a first attempt at a unit test for the messager.py module posted earlier.
This is a first attempt at a unit test for the messager.py module posted earlier.