Remove modules except for oldmodules and encodings in order to preserve internal cache.
test.support.import_helper/modules_cleanup
modules_cleanup