[issue25699] Easier way to specify reduced globals for doctest
John Mark Vandenberg
report at bugs.python.org
Sun Oct 2 20:23:15 EDT 2016
John Mark Vandenberg added the comment:
pyflakes does assume doctest run with a copy of the module scope.
However when there is an __all__, the module scope as seen by other modules 'should' be only items in __all__. If a doctest is included in documentation, it 'should' only use names that are in __all__.
In addition, pyflakes has an outstanding feature request (https://bugs.launchpad.net/pyflakes/+bug/1178807/comments/8) that doctest run as if they are an independent module, and need to import everything that they use, so that each doctest is self-contained.
pyflakes can build support for both of those needs within the package. No worries. If you cant see a broader need for these, please close.
----------
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue25699>
_______________________________________
More information about the Python-bugs-list
mailing list