Commit e1ff174d authored by narugo1992's avatar narugo1992
Browse files

dev(narugo): add cache deletion on CI environment

parent e7d67cd5
Loading
Loading
Loading
Loading
+0 −3315

File deleted.

Preview size limit exceeded, changes collapsed.

+9 −0
Original line number Diff line number Diff line
import os

import pytest
from hbutils.testing import TextAligner
from hfutils.cache import delete_cache

try:
    import torch
@@ -15,3 +18,9 @@ def _try_import_torch():
@pytest.fixture()
def text_aligner():
    return TextAligner().multiple_lines()


@pytest.fixture(autouse=True, scope='module')
def clean_hf_cache():
    if os.environ.get('CI'):
        delete_cache()