Various test fixes
This commit is contained in:
@@ -8,6 +8,10 @@ import numpy as np
|
||||
import pytest
|
||||
|
||||
|
||||
class ChunkProcessingError(Exception):
|
||||
"""Simulates a chunk processing failure in the fake Kokoro processor."""
|
||||
|
||||
|
||||
def test_tts_engine_init(mock_kokoro_tts: MagicMock) -> None:
|
||||
"""Test TTSEngine initialization."""
|
||||
from vibe_bot.tts import TTSEngine
|
||||
@@ -91,7 +95,7 @@ def test_generate_audio_chunk_failure(mock_kokoro_tts: MagicMock) -> None:
|
||||
lang: str,
|
||||
) -> tuple[np.ndarray, int]:
|
||||
if chunk == "bad chunk":
|
||||
raise Exception("processing error")
|
||||
raise ChunkProcessingError("processing error")
|
||||
return np.array([0.1, 0.2], dtype=np.float32), 24000
|
||||
|
||||
mock_kokoro_tts["chunk_text"].return_value = [
|
||||
|
||||
Reference in New Issue
Block a user