This is called unit testing, since the set of two conversion functions can be written and tested as a unit, separate from any larger program they may become part of later. Python has a framework for unit testing, the appropriately-named unittest module. Python 2.0 users can download it from pyunit.sourceforge.net .
Unit testing is an important part of an overall testing-centric development strategy.
While writing code, it keeps you from over-coding. When all the test cases pass, the function is complete. When refactoring code, it assures you that the new version behaves the same way as the old version. When maintaining code, it helps you cover your ass when someone comes screaming that your latest change broke their old code. This is the complete test suite for our Roman numeral conversion functions, which are yet to be written but will eventually be in roman.py .