diff options
| author | historia <historiavg@proton.me> | 2026-08-24 17:37:34 -0400 |
|---|---|---|
| committer | historia <historiavg@proton.me> | 2026-08-24 17:37:34 -0400 |
| commit | d950fc8e64ee508334e608f6045d687d73a464be (patch) | |
| tree | 87e5539b486c7f15ffba53bbba6ef6bb3a02540e /app/tests/test_backends.py | |
| parent | 919544c0931d53bb81904b6212ff14f856549da3 (diff) | |
| download | tts-audiobook-generator-d950fc8e64ee508334e608f6045d687d73a464be.tar.gz | |
feat: tui backend server progress and generate script progress
Diffstat (limited to 'app/tests/test_backends.py')
| -rw-r--r-- | app/tests/test_backends.py | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/app/tests/test_backends.py b/app/tests/test_backends.py index 2cb5a95..acee6b6 100644 --- a/app/tests/test_backends.py +++ b/app/tests/test_backends.py @@ -5,7 +5,18 @@ import unittest from pathlib import Path from unittest.mock import patch -from backends import REGISTRY, detect_all, get +from backends import REGISTRY, ServerSpec, detect_all, format_launch_hint, get + + +class FormatLaunchHintTests(unittest.TestCase): + def test_plain_specs_join_argv(self): + specs = [ServerSpec("a", "http://x", ["cmd", "--flag"])] + self.assertEqual(format_launch_hint(specs), "cmd --flag") + + def test_cwd_prefixes_the_command(self): + specs = [ServerSpec("a", "http://x", ["cmd"], cwd=Path("/opt/audio.cpp"))] + self.assertEqual(format_launch_hint(specs), + "cd /opt/audio.cpp && cmd") class RegistryTests(unittest.TestCase): |
