[ python-Bugs-1650090 ] doctest doesn't find nested functions

SourceForge.net noreply at sourceforge.net
Thu Feb 1 20:20:32 CET 2007


Bugs item #1650090, was opened at 2007-02-01 20:20
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1650090&group_id=5470

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Python Library
Group: Python 2.5
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Daniel Brown (danb37)
Assigned to: Nobody/Anonymous (nobody)
Summary: doctest doesn't find nested functions

Initial Comment:
If a nested function has doctests, they won't be run:
{{{
def f():
  '''
  >>> 'a'
  'a'
  '''

  def g():
    '''
    >>> 'a'
    'b'
    '''
    pass

  pass
}}}

DocTestFinder will only find f's doctest and won't recurse to find g's, surprising the programmer when they (hopefully) discover that their inner doctest is incorrect!

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1650090&group_id=5470


More information about the Python-bugs-list mailing list