[Bugfix] Isolate weekly CPU tests from inherited attention env and hf_api mocks (#7565)

Signed-off-by: wangyu <410167048@qq.com>
Signed-off-by: [Your Name] <your.email@example.com>
Signed-off-by: [Your Name] [Your Email]
This commit is contained in:
wangyu authored and GitHub committed 2026-09-21 15:55:00 +00:00
1 parent 2c2cffd2aa
commit 279b1b9687
22 files changed
+236 -221

No files matched your search

@@ -3,21 +3,21 @@
import contextlib
import huggingface_hub
import pytest
from tests.helpers.mock import patch_hf_snapshot_download
from vllm_omni.diffusion.model_loader import hub_prefetch
pytestmark = [pytest.mark.core_model, pytest.mark.diffusion, pytest.mark.cpu]
def test_prefetch_subfolders_propagates_revision(monkeypatch):
def test_prefetch_subfolders_propagates_revision(monkeypatch, tmp_path):
calls = []
def fake_snapshot_download(self, **kwargs):
def fake_snapshot_download(**kwargs):
calls.append(kwargs)
monkeypatch.setattr(huggingface_hub.HfApi, "snapshot_download", fake_snapshot_download)
patch_hf_snapshot_download(monkeypatch, fake_snapshot_download, hf_home=tmp_path)
monkeypatch.setattr(hub_prefetch, "_repo_prefetch_lock", lambda _model: contextlib.nullcontext())
hub_prefetch.prefetch_subfolders(