def review(self) -> Tuple[bool, Optional[str]]: with tempfile.TemporaryDirectory() as tmpdir: r = self.review_int(tmpdir) if self.options.export_sources: shutil.copytree(os.path.join(tmpdir, 'src'), self.options.export_sources) return r
def setUp(self): self._workdir = tempfile.TemporaryDirectory() self.workdir = self._workdir.name
def make_wrap(name: str, repo_url: str, branch: str) -> wrap.Wrap: with tempfile.TemporaryDirectory() as workdir: with contextlib.closing( git.Repo.clone_from(repo_url, workdir, branch=branch)) as repo: return _make_wrap(workdir, name, repo, branch)
def setUp(self): self.tmp = tempfile.TemporaryDirectory() self.repo = git.Repo.init(self.tmp.name)
def __enter__(self): self._tmp = tempfile.TemporaryDirectory() self._projects = dict() return self
def publish(cls, organization: str, project: str, branch: str): ghrepo = environment.repo(organization, project) wrap = wrapcreator.make_wrap(project, ghrepo.clone_url, branch) with tempfile.TemporaryDirectory() as tmp: cls._import_wrap(tmp, organization, wrap)