I think all doctest runners supports custom globals. The following fails:
` _m = 1
def doctest_stuff(self): ''' >>> _m 1 ''' return 1
if __name__ == "__main__": import doctest doctest.testmod(globs={}) `
The problem is that pyflakes and other tools are assuming doctests are run with the default `doctest.testmod` arguments.
I've raised a bug for the list of desired globals to be more easily specified in a way other tools can detect.
http://bugs.python.org/issue25699
I think all doctest runners supports custom globals. The following fails:
`
_m = 1
def doctest_ stuff(self) :
'''
>>> _m
1
'''
return 1
if __name__ == "__main__": testmod( globs={ })
import doctest
doctest.
`
The problem is that pyflakes and other tools are assuming doctests are run with the default `doctest.testmod` arguments.
I've raised a bug for the list of desired globals to be more easily specified in a way other tools can detect.
http:// bugs.python. org/issue25699