[Python-Dev] test___all__ polluting sys.modules? (original) (raw)

Eli Bendersky eliben at gmail.com
Sun Dec 30 01:56:51 CET 2012


On Sat, Dec 29, 2012 at 4:46 PM, Benjamin Peterson <benjamin at python.org>wrote:

2012/12/29 Eli Bendersky <eliben at gmail.com>: > Hi, > > This came up while investigating some test-order-dependency failures in > issue 16076. > > test_all goes over modules that have _all_ in them and does 'from_ > import *' on them. This leaves a lot of modules in sys.modules, > which may interfere with some tests that do fancy things with sys,modules. > In particular, the ElementTree tests have trouble with it because they > carefully set up the imports to get the C or the Python version of etree > (see issues 15083 and 15075). > > Would it make sense to save the sys.modules state and restore it in > test_all so that sys.modules isn't affected by this test?_

Sounds reasonable to me.

Thanks. http://bugs.python.org/issue16817

Eli

-- Regards, Benjamin -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.python.org/pipermail/python-dev/attachments/20121229/dc38db60/attachment-0001.html>



More information about the Python-Dev mailing list