def tearDown(self):
        from djangocms_installer.config.settings import MIGRATIONS_CHECK_MODULES
        if self.verbose:
            print('deactivating virtualenv', self.virtualenv_dir)
        if os.path.exists(SYSTEM_ACTIVATE):
            try:
                execfile(SYSTEM_ACTIVATE, dict(__file__=SYSTEM_ACTIVATE))
            except __HOLE__:
                with open(SYSTEM_ACTIVATE) as f:
                    code = compile(f.read(), SYSTEM_ACTIVATE, 'exec')
                exec(code, dict(__file__=SYSTEM_ACTIVATE))
            sys.executable = os.path.join(os.path.dirname(SYSTEM_ACTIVATE), 'python')
        super(IsolatedTestClass, self).tearDown()
        modules = copy(sys.modules)
        for module in modules:
            if 'django' in module:
                del sys.modules[module]
dataset/ETHPy150Open nephila/djangocms-installer/tests/base.py/IsolatedTestClass.tearDown