DZone Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world

Snippets has posted 5883 posts at DZone. View Full User Profile

Python Unit Tests With Doctest

09.07.2005
| 880 views |
  • submit to reddit
        
def mulby2(a):
    """
    >>> mulby2(5)
    10
    """
    return 2*a
    
    
import doctest
doctest.testmod()