Source

pymotw-ja / PyMOTW / doctest / doctest_private_tests.py

Full commit
#!/usr/bin/env python
# encoding: utf-8
#
# Copyright (c) 2010 Doug Hellmann.  All rights reserved.
#
"""Defining tests not visible in the documentation.
"""
#end_pymotw_header

import doctest_private_tests_external

__test__ = {
    'numbers':"""
>>> my_function(2, 3)
6

>>> my_function(2.0, 3)
6.0
""",

    'strings':"""
>>> my_function('a', 3)
'aaa'

>>> my_function(3, 'a')
'aaa'
""",

    'external':doctest_private_tests_external,
    
    }

def my_function(a, b):
    """Returns a * b
    """
    return a * b