--- release27-maint/Lib/test/regrtest.py 2010-07-13 18:11:32.000000000 +0200 +++ /usr/local/lib/python2.7/test/regrtest.py 2010-07-13 18:00:52.000000000 +0200 @@ -181,6 +181,12 @@ # (site.py absolutize them), the __file__ and __path__ will be absolute too. # Therefore it is necessary to absolutize manually the __file__ and __path__ of # the packages to prevent later imports to fail when the CWD is different. + +# Email modules are imported lazily, force their import first. +if 'email' in sys.modules: + [hasattr(sys.modules[name], '__foo__') for name in list(sys.modules) + if name.startswith('email.')] + for module in sys.modules.itervalues(): if hasattr(module, '__path__'): module.__path__ = [os.path.abspath(path) for path in module.__path__]