Esempio n. 1
0
    def test_extract_file_zipfile(self):
        src_files = sorted(os.listdir(self.source))

        extracted = extract_file(self.zip, self.tests_folder)

        extracted_files = sorted(os.listdir(extracted))

        self.assertEqual(extracted_files, src_files)
Esempio n. 2
0
    def test_extract_file_tarfile(self):
        src_files = sorted(os.listdir(self.source))

        extracted = extract_file(self.tar, self.base)

        extracted_files = sorted(os.listdir(extracted))

        self.assertEqual(extracted_files, src_files)
Esempio n. 3
0
def installreveal(url):
    """Reveal.js installation command

    Receives the download url to install from a specific version or
    downloads the latest version if noting is passed
    """
    click.echo("Downloading reveal.js...")

    download = download_reveal(url)

    click.echo("Installing reveal.js...")

    move_and_replace(extract_file(download[0]), REVEALJS_FOLDER)

    click.echo("Installation completed!")