def setUp(self):
        super(IsolatedTestClass, self).setUp()
        if os.path.exists(SYSTEM_ACTIVATE):
            subprocess.check_call(['virtualenv', '-q', '--python=%s' % sys.executable, self.virtualenv_dir])
            activate_temp = os.path.join(self.virtualenv_dir, 'bin', 'activate_this.py')
            try:
                execfile(activate_temp, dict(__file__=activate_temp))
            except __HOLE__:
                with open(activate_temp) as f:
                    code = compile(f.read(), activate_temp, 'exec')
                exec(code, dict(__file__=activate_temp))
            if self.verbose:
                print('activating virtualenv', self.virtualenv_dir)
            sys.executable = os.path.join(self.virtualenv_dir, 'bin', 'python')
dataset/ETHPy150Open nephila/djangocms-installer/tests/base.py/IsolatedTestClass.setUp