/ Published in: Python

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.
Note: doctest will only complain if a test fails. If you see on output then all your tests must have passed.
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
def add(x,y): """ >>> add(5,6) 11 """ return x+y if __name__ == "__main__": import doctest doctest.testmod()
URL: http://snipplr.com/users/stoyan/
Comments
