A TTS that fits in your CPU (and pocket)
Python
Add basic public API tests to test_python_api.py (#114)
Emir Belkahiaa8c735a9a4c3
diff --git a/tests/test_python_api.py b/tests/test_python_api.pyindex e69de29..5740d7d 100644--- a/tests/test_python_api.py+++ b/tests/test_python_api.py@@ -0,0 +1,26 @@+"""Tests for the public Python API surface."""++import pocket_tts+from pocket_tts import TTSModel+from pocket_tts.models.tts_model import TTSModel as TTSModelImpl+++def test_public_api_exports_only_tts_model():+ assert pocket_tts.__all__ == ["TTSModel"]+++def test_public_api_tts_model_points_to_implementation():+ assert TTSModel is TTSModelImpl+++def test_public_api_expected_methods_and_properties():+ for method_name in (+ "load_model",+ "generate_audio",+ "generate_audio_stream",+ "get_state_for_audio_prompt",+ ):+ assert callable(getattr(TTSModel, method_name))++ for property_name in ("device", "sample_rate"):+ assert isinstance(getattr(TTSModel, property_name), property)