In addition to all the examples in your docstrings, which serve as both demonstrations and tests of your code, you should consider creating a test suite. Think of this as a program that will run for a while and ``tries'' to crash your code using randomly generated input. Your test code should define a class Test with a random() method that runs random tests. These are all assembled together later, and each test is run for a certain amount of time on a regular basis.
For example, see the file SAGE_ROOT/devel/sage/sage/modular/modsym/tests.py.
See About this document... for information on suggesting changes.