Revision: 8595
Initial Code
Initial URL
Initial Description
Initial Title
Initial Tags
Initial Language
at September 29, 2008 21:42 by stoyan
Initial Code
def add(x,y):
"""
>>> add(5,6)
11
"""
return x+y
if __name__ == "__main__":
import doctest
doctest.testmod()
Initial URL
http://snipplr.com/users/stoyan/
Initial Description
This is going to run all doctests for all methods in a module. Doctests are a beautiful thing. Note: doctest will only complain if a test fails. If you see on output then all your tests must have passed.
Initial Title
Running Doctest/Docutils
Initial Tags
python
Initial Language
Python