Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def test_download(self):
SourceLoader.download_archive(
"https://github.com/rh-lab-q/rpg/archive/master.tar.gz",
self._download)
self.assertTrue(Path(str(self._download)).exists())
def setUp(self):
self._source_loader = SourceLoader()
self._tar = None
self._tar_dir = self.test_project_dir / "archives"
self._tar_gz = self.test_project_dir / "archives" / "sample.tar.gz"
self._tar_xz = self.test_project_dir / "archives" / "sample.tar.xz"
self._tar_temp = Path("/var/tmp/rpg_test/")
self._tar_extracted = self._tar_temp / "extracted"
self._download = self._tar_temp / "download.tar.gz"
if path.isdir(path_to_str(self._tar_temp)):
rmtree(path_to_str(self._tar_temp))
makedirs(path_to_str(self._tar_temp))
makedirs(path_to_str(self._tar_extracted))
def setUp(self):
self._source_loader = SourceLoader()
self._tar_temp = Path("/var/tmp/rpg_test/")
self._download = self._tar_temp / "download.tar.gz"
if path.isdir(str(self._tar_temp)):
rmtree(str(self._tar_temp))
makedirs(str(self._tar_temp))