Brett Cannon <br...@python.org> added the comment:

Realized that any decorator or context manager that is created for swapping 
_frozen_importlib/importlib._bootstrap should also verify no module is left in 
sys.modules with a bad loader and that sys.path_importer_cache doesn't have a 
bad finder (I would say that this would go into test.support.regrtest's state 
checks, but that seems overkill for only two tests).

And this might be worth doing as a decorator (method or class) to make it 
easier to make sure the requisite tests always run with both versions (or 
copying what test_warnings does). I don't want to do anything in a module's 
test_main() as that precludes using unittest's test discovery for running tests.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue14657>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to