@@ -1,5 +1,8 @@
|
||||
"""Integration tests for the CLI generate command using real implementation."""
|
||||
|
||||
import os
|
||||
|
||||
import pytest
|
||||
from typer.testing import CliRunner
|
||||
|
||||
from pocket_tts.data.audio import audio_read
|
||||
@@ -10,6 +13,9 @@ other_voice = "https://huggingface.co/kyutai/tts-voices/resolve/main/expresso/ex
|
||||
|
||||
runner = CliRunner()
|
||||
|
||||
IS_CI = os.environ.get("CI") == "true"
|
||||
CI_SKIP_REASON = "Voice cloning is not publicly available, skipping in the CI"
|
||||
|
||||
|
||||
def test_generate_basic_usage(tmp_path):
|
||||
"""Test basic generate command with default parameters."""
|
||||
@@ -32,6 +38,7 @@ def test_generate_basic_usage(tmp_path):
|
||||
assert sample_rate == 24000 # Expected sample rate
|
||||
|
||||
|
||||
@pytest.mark.skipif(IS_CI, reason=CI_SKIP_REASON)
|
||||
def test_generate_with_custom_voice(tmp_path):
|
||||
"""Test generate command with custom voice prompt."""
|
||||
output_file = tmp_path / "custom_voice_test.wav"
|
||||
|
||||
Reference in New Issue
Block a user