Skip to content

Commit

Permalink
Fix teardown
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelbenayoun committed Feb 26, 2025
1 parent 701360b commit 412e16f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,12 +114,12 @@ def _hub_test(create_local_cache: bool = False):
else:
yield custom_cache_repo_with_seed


delete_repo(custom_cache_repo_with_seed, repo_type="model")

model_repos = HfApi().list_models()
model_repos = HfApi().list_models(author=" optimum-internal-testing-user")
for repo in model_repos:
if repo.id.startswith("optimum-neuron-cache-for-testing-"):
delete_repo(repo.id)
delete_repo(repo.id)

if local_cache_path_with_seed.is_dir():
shutil.rmtree(local_cache_path_with_seed)
Expand Down

0 comments on commit 412e16f

Please sign in to comment.