Skip to content

Commit

Permalink
fix: flaky tests in test_utils caused by caching
Browse files Browse the repository at this point in the history
  • Loading branch information
meetbryce committed Oct 11, 2024
1 parent 15a8a1e commit c0066e9
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions tests/test_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,13 @@
from ossai import utils


@pytest.fixture(autouse=True)
def clear_cache():
utils._id_name_cache.clear()
yield
utils._id_name_cache.clear()


@pytest.fixture
def mock_client():
with patch("ossai.utils.WebClient") as mock_client:
Expand Down

0 comments on commit c0066e9

Please sign in to comment.