[issue25695] test___all__ and test_support alter execution environment

SilentGhost report at bugs.python.org
Sun Nov 22 05:52:10 EST 2015


SilentGhost added the comment:

test_support has this line:

TESTDIRN = os.path.basename(tempfile.mkdtemp(dir='.'))

Which is the culprit. The reason it gets so far as to import the module is due to the "fuzzy logic" check looking for __all__ 
What I'd suggest is replacing simple "in" string search with re.search for '\b__all__\b'. The downside of this is that the test execution time increased from .4 s to .7 s on my machine.

----------
keywords: +needs review, patch
nosy: +SilentGhost
stage:  -> patch review
Added file: http://bugs.python.org/file41122/issue25695.diff

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue25695>
_______________________________________


More information about the Python-bugs-list mailing list