From 34c9482cfba1c376a81dadfeb1b8f9074d2bc453 Mon Sep 17 00:00:00 2001 From: doctorpangloss <@hiddenswitch.com> Date: Tue, 9 Jul 2024 22:02:07 -0700 Subject: [PATCH] Tweak downloader test --- tests/downloader/test_huggingface_downloads.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/downloader/test_huggingface_downloads.py b/tests/downloader/test_huggingface_downloads.py index 95a97eeda..692701d6d 100644 --- a/tests/downloader/test_huggingface_downloads.py +++ b/tests/downloader/test_huggingface_downloads.py @@ -141,7 +141,8 @@ def test_known_repos(tmp_path_factory): finally: _delete_repo_from_huggingface_cache(test_repo_id) _delete_repo_from_huggingface_cache(test_repo_id, test_cache_dir) - KNOWN_HUGGINGFACE_MODEL_REPOS.remove(test_repo_id) + if test_repo_id in KNOWN_HUGGINGFACE_MODEL_REPOS: + KNOWN_HUGGINGFACE_MODEL_REPOS.remove(test_repo_id) folder_paths.folder_names_and_paths["huggingface"] = prev_huggingface folder_paths.folder_names_and_paths["huggingface_cache"] = prev_huggingface_cache if prev_hub_cache is None and "HF_HUB_CACHE" in os.environ: