def setUp(self): self.old_home = os.getenv('HOME') os.environ['HOME'] = os.path.abspath('.') reset_run_commands() os.environ['VIRTUAL_ENV'] = self.test_env os.mkdir(os.getenv('VIRTUAL_ENV'))
def setUp(self): reset_run_commands() ws = pkg_resources.WorkingSet([]) dist = pkg_resources.Distribution.from_filename('.') ws.add(dist) self.working_set = ws