How to use the rpg.source_loader.SourceLoader function in rpg

To help you get started, we’ve selected a few rpg examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github rh-lab-q / rpg / tests / connection / test_source_loader_connection.py View on Github external
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())
github rh-lab-q / rpg / tests / unit / test_source_loader.py View on Github external
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))
github rh-lab-q / rpg / tests / connection / test_source_loader_connection.py View on Github external
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))