[issue25699] Easier way to specify reduced globals for doctest

2016-10-02 Thread John Mark Vandenberg
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

[issue25699] Easier way to specify reduced globals for doctest

2015-11-23 Thread R. David Murray
R. David Murray added the comment: I don't understand what the problem is you are trying to solve. Doctests are designed to run with a copy of the module global scope. If pyflakes does not understand that, it is a pyflakes bug, but it doesn't sound like that's the issue. It sounds like you

[issue25699] Easier way to specify reduced globals for doctest

2015-11-22 Thread John Mark Vandenberg
New submission from John Mark Vandenberg: Currently doctest.testmod `globals` defaults to including everything in the module scope, and tools like pyflakes assume that doctests run with globals as a copy of __dict__ . It is relatively simple to exclude everything using doctest.testmod(globs={}