Example #1
0
def get_data():
    if os.path.exists(samples_dir):
        print(f"The samples directory {samples_dir}"
              " seems to exist already. Delete if re-download is needed.")
    else:
        print("Downloading the samples... ", end="")
        download_uncompress(url_data, temp_dir)
        # change the directory name to the desired one
        dl_dir = os.listdir(temp_dir)[0]
        os.rename(os.path.join(temp_dir, dl_dir), samples_dir)
        os.rmdir(temp_dir)
        print("done.")
Example #2
0
def test_download_uncompress():
    context = ssl._create_unverified_context()
    download_uncompress(test_url, context=context)
    shutil.rmtree(extracted_name, ignore_errors=True)
Example #3
0
def test_download_uncompress():

    download_uncompress(test_url)
    shutil.rmtree(extracted_name, ignore_errors=True)