diff options
| author | historia <historiavg@proton.me> | 2026-08-25 16:40:30 -0400 |
|---|---|---|
| committer | historia <historiavg@proton.me> | 2026-08-25 16:40:30 -0400 |
| commit | 867866f131b0b6c76c54272791e7f7dea01db990 (patch) | |
| tree | b57ecdd66eeaf7ad73742d2f2bbe15d3a5498fa3 /app/tests/test_tui.py | |
| parent | fca3431721a55277f139efc83df2438207917448 (diff) | |
| download | tts-audiobook-generator-867866f131b0b6c76c54272791e7f7dea01db990.tar.gz | |
feat: better tui menu option gating for models that support custom voices (qwen) and models that do not support instructions
Diffstat (limited to 'app/tests/test_tui.py')
| -rw-r--r-- | app/tests/test_tui.py | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/app/tests/test_tui.py b/app/tests/test_tui.py index 964f983..543194e 100644 --- a/app/tests/test_tui.py +++ b/app/tests/test_tui.py @@ -204,6 +204,17 @@ class MenuTests(TuiTestCase): self.assertGreater(help_x, margin) self.assert_inside_border(screen) + def test_blank_line_below_the_title(self): + # A titled dialog reserves a blank line between the title row + # and the first body row. + screen = FakeScreen(keys=[10]) + tui.menu(screen, "Pick", self.OPTIONS) + title_y = next(y for y, _, text, _ in screen.strings + if text == " Pick ") + first_y = next(y for y, _, text, _ in screen.strings + if text == "first option") + self.assertEqual(first_y, title_y + 2) + def test_up_wraps_around_to_last_option(self): screen = FakeScreen(keys=[FakeCurses.KEY_UP, 10]) value = tui.menu(screen, "Pick one", self.OPTIONS) |
