def test_save_down(tempdir, azure): with setup_tree(azure): down = ADLDownloader(azure, test_dir, tempdir, 1, 2**24, run=False, overwrite=True) down.save() alldownloads = ADLDownloader.load() assert down.hash in alldownloads down.save(keep=False) alldownloads = ADLDownloader.load() assert down.hash not in alldownloads
def do_resume_download(self, line): try: up = ADLDownloader.load()[line] up.run() except KeyError: print("No such download")
def do_list_downloads(self, line): print(ADLDownloader.load())