R. David Murray <rdmur...@bitdance.com> added the comment: Thanks for figuring that out. And no, it doesn't matter if it is importlib.load_module or __import__, since both are provided by importlib now and both use the cache.
It's an interesting question where the cache clear should go. I *think* it should go in the test, based on the idea that the cache is part of the environment, and therefore should be reset by tests that change what's on the path. I'm not sure how we'd write an environment monitor for that, since not all changes to the import cache need to be reset. I wonder if it would be worth putting a reset into DirsOnSysPath. ---------- nosy: +brett.cannon _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue7559> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com