Skip to content

Commit

Permalink
Bypass CacheNotFound err on CI/CD resulting passing test for wrong re…
Browse files Browse the repository at this point in the history
…ason
  • Loading branch information
juhoinkinen committed Oct 1, 2024
1 parent 80eb1b2 commit 654a376
Showing 1 changed file with 2 additions and 1 deletion.
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

0 comments on commit 654a376

Please sign in to comment.