From 0f67da8acf696aace9f7e2f3a4c5b277ae321e79 Mon Sep 17 00:00:00 2001 From: Dmitry Dementiev Date: Tue, 1 Sep 2026 22:32:21 +0300 Subject: [PATCH] =?UTF-8?q?test(diarization):=20=D0=B8=D0=B7=D0=BE=D0=BB?= =?UTF-8?q?=D0=B8=D1=80=D0=BE=D0=B2=D0=B0=D0=BD=D0=B0=20=D0=BF=D1=80=D0=BE?= =?UTF-8?q?=D0=B2=D0=B5=D1=80=D0=BA=D0=B0=20=D0=BA=D0=B5=D1=88=D0=B0=20?= =?UTF-8?q?=D0=BC=D0=BE=D0=B4=D0=B5=D0=BB=D0=B5=D0=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Зачем: - детерминированный 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. --- tests/test_speaker_diarizer.py | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/test_speaker_diarizer.py b/tests/test_speaker_diarizer.py index 589d5d0..e39200b 100644 --- a/tests/test_speaker_diarizer.py +++ b/tests/test_speaker_diarizer.py @@ -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="Контрольная сумма"), ):