test(diarization): изолирована проверка кеша моделей

- Зачем:
  - детерминированный gate эксперимента не должен загружать native runtime в checksum-only тесте.
- Что:
  - в тест проверки поврежденного кеша добавлена структурная подмена sherpa_onnx.
- Проверка:
  - uv run pytest -q tests/test_streaming_sortformer_experiment.py tests/test_benchmark_experiment.py tests/test_speaker_diarizer.py tests/test_diarization.py.
This commit is contained in:
Dmitry Dementiev committed 2026-09-01 22:32:21 +03:00
1 parent 28d0f37b82
commit 0f67da8acf
1 file changed
+1
+1
View File
@@ -222,6 +222,7 @@ def test_load_speaker_diarizer_keeps_corrupt_cache_when_download_is_invalid(
with (
patch("huggingface_hub.cached_assets_path", return_value=tmp_path),
patch.dict(sys.modules, {"sherpa_onnx": SimpleNamespace()}),
patch("httpx.stream", return_value=FakeResponse()),
pytest.raises(RuntimeError, match="Контрольная сумма"),
):