Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add --trust-repo option to download CLI command #807

Merged
merged 6 commits into from
Oct 1, 2024
Prev Previous commit
Bypass CacheNotFound err on CI/CD resulting passing test for wrong re…
…ason
  • Loading branch information
juhoinkinen committed Oct 1, 2024
commit 654a3764d655322a6509b57a3a0f7f761f10d077
3 changes: 2 additions & 1 deletion tests/test_hfh_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,8 @@ def test_download_allowed_repo_in_cache(mock_is_repo_in_cache, caplog):


@mock.patch("huggingface_hub.utils._cache_manager.HFCacheInfo")
def test_download_not_allowed(mock_HFCacheInfo):
@mock.patch("huggingface_hub.scan_cache_dir") # Bypass CacheNotFound on CI/CD
def test_download_not_allowed(mock_scan_cache_dir, mock_HFCacheInfo):
trust_repo = False
repo_id = "dummy-repo"
mock_HFCacheInfo.return_value.repos = frozenset()
Expand Down
Loading