[issue16817] test___all__ affects other tests by doing too much importing

Eric Snow report at bugs.python.org
Sat Jan 26 06:51:01 CET 2013


Eric Snow added the comment:

So the current solution is to temporarily put the relevant module in place in sys.modules, right?  That seems to be the solution that Stefan recommended and used in the decimal module.  Sounds good to me.

I'm hitting this while doing the PEP 399 two-step for the collections module.  It seems like this will be a problem for testing any module that has had such attention and has __all__.  I'd be a fan of a class decorator that would take care of this and the rest of the PEP 399 stuff for you.

I've created issue #17037 to cover that (so it doesn't get muddled in with this discussion of test___all__).  There's even a proposed patch.

----------
nosy: +eric.snow

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


More information about the Python-bugs-list mailing list