Import the vocalinux source tree (tray app, Next.js site in web/, packaging, installers, docs and tests) on top of the Gitea template commit. The project README replaces the template README, and the template CI files (.gitea/workflows/ci.yml, .jscpd.json, CI.md) are kept.
19 lines
571 B
Python
19 lines
571 B
Python
"""Tests for speech-engine display name helpers."""
|
|
|
|
from vocalinux.ui.settings_dialog import (
|
|
ENGINE_DISPLAY_NAMES,
|
|
_engine_display_name,
|
|
_engine_from_display,
|
|
)
|
|
|
|
|
|
def test_whisper_cpp_display_name():
|
|
assert ENGINE_DISPLAY_NAMES["whisper_cpp"] == "whisper.cpp"
|
|
assert _engine_display_name("whisper_cpp") == "whisper.cpp"
|
|
assert _engine_from_display("whisper.cpp") == "whisper_cpp"
|
|
|
|
|
|
def test_engine_display_roundtrip():
|
|
for engine_id in ENGINE_DISPLAY_NAMES:
|
|
assert _engine_from_display(_engine_display_name(engine_id)) == engine_id
|