is there any way to doctest locally defined functions? As an example I would want
def foo():
""" >>> foo()
testfoo"""
def foo2():
""" >>> 1/0 """
print 'testfoo'
foo2()
to NOT pass the test. But still I would not want to make foo2 global for the entire module...