# tests/test_smoke.py """Optional end-to-end test that calls real mmx. Skipped by default. Run with: pytest --run-smoke -v """ import os import shutil from pathlib import Path import pytest REPO_ROOT = Path(__file__).resolve().parents[1] def mmx_available() -> bool: return shutil.which("mmx") is not None pytestmark = pytest.mark.skipif( not mmx_available(), reason="mmx CLI not on PATH", ) @pytest.mark.skipif( "--run-smoke" not in os.sys.argv, reason="pass --run-smoke to execute real mmx calls", ) def test_smoke_synthesize_with_default_voice(tmp_path): from voice_gen.synthesizer import _default_run out = tmp_path / "smoke.mp3" cmd = [ "mmx", "speech", "synthesize", "--non-interactive", "--quiet", "--text", "Smoke test.", "--out", str(out), ] result = _default_run(cmd) assert result.returncode == 0, result.stderr assert out.exists() assert out.stat().st_size > 100