def test_download(repo: RemoteFileRepo, expected_file): assert not repo.is_local(expected_file) model_file_path = repo.download(expected_file) assert repo.is_local(expected_file) assert os.path.isfile(model_file_path) assert repo.list_local() == [expected_file] assert repo.get(expected_file) == model_file_path
def test_delete(repo: RemoteFileRepo, expected_file): model_file_path = repo.get(expected_file) repo.delete(expected_file) assert not repo.is_local(expected_file) assert repo.list_local() == [] assert not os.path.exists(model_file_path)
def test_autoload(repo: RemoteFileRepo, expected_file): assert not repo.is_local(expected_file) file_path = repo.get(expected_file) assert repo.is_local(expected_file) assert os.path.exists(file_path)