Python - doctest
# add this to the end of the module if __name__ == "__main__": import doctest doctest.testmod()