diff options
Diffstat (limited to 'app/tests/test_backends_audiocpp.py')
| -rw-r--r-- | app/tests/test_backends_audiocpp.py | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/app/tests/test_backends_audiocpp.py b/app/tests/test_backends_audiocpp.py index 8b1698b..7edb3c9 100644 --- a/app/tests/test_backends_audiocpp.py +++ b/app/tests/test_backends_audiocpp.py @@ -385,6 +385,31 @@ class LoadModelCatalogTests(unittest.TestCase): self.assertNotIn("empty_tts", [entry["family"] for entry in catalog]) + def test_skips_speech_to_speech_only_families(self): + # PersonaPlex-style specs: categorized "tts" but with a task list + # naming no text-synthesis capability — the family cannot narrate + # text and every request would fail, so it is never offered for + # install (the generic task check, no family names hardcoded). + _write_spec(self.checkout, "personaplex", tasks=("s2s",)) + catalog = make_server.catalog.load_model_catalog(self.checkout) + self.assertNotIn("personaplex", + [entry["family"] for entry in catalog]) + + def test_design_only_family_is_kept(self): + # Voice design is a text-synthesis task: a vdes-only spec stays + # installable. + _write_spec(self.checkout, "designer", tasks=("vdes",)) + catalog = make_server.catalog.load_model_catalog(self.checkout) + self.assertIn("designer", [entry["family"] for entry in catalog]) + + def test_taskless_tts_category_fallback_is_kept(self): + # A spec without a task list keeps the old category fallback, so + # a future/malformed "tts" spec is not silently dropped. + _write_spec(self.checkout, "mystery_tts", tasks=()) + catalog = make_server.catalog.load_model_catalog(self.checkout) + self.assertIn("mystery_tts", + [entry["family"] for entry in catalog]) + def test_families_sorted_alphabetically_by_display_name(self): catalog = make_server.catalog.load_model_catalog(self.checkout) names = [entry["display_name"].lower() for entry in catalog] |
