aboutsummaryrefslogtreecommitdiff
path: root/app/tests/test_runview.py
diff options
context:
space:
mode:
authorhistoria <historiavg@proton.me>2026-08-25 19:03:09 -0400
committerhistoria <historiavg@proton.me>2026-08-25 19:03:09 -0400
commit8c9a782dfe94525dc5f0893c98fd19543648264b (patch)
treefdff70d967ef06f0da560ca284842427cbe647a8 /app/tests/test_runview.py
parent64e9940d43fad1bc5908b39673b03e4fdc1e8f2f (diff)
downloadtts-audiobook-generator-8c9a782dfe94525dc5f0893c98fd19543648264b.tar.gz
fix: tui errors wait for getch()
Diffstat (limited to 'app/tests/test_runview.py')
-rw-r--r--app/tests/test_runview.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/app/tests/test_runview.py b/app/tests/test_runview.py
index df697c8..7006427 100644
--- a/app/tests/test_runview.py
+++ b/app/tests/test_runview.py
@@ -191,6 +191,14 @@ class RunLoopTests(_FakeTui, unittest.TestCase):
# (started_server is False).
self.assertEqual(view.phase, "done")
+ def test_run_leaves_the_screen_blocking_again(self):
+ # The timed redraw cadence must not leak into the hub: blocking
+ # input is restored so later dialogs (tui.flash) wait for keys.
+ view, screen = self.make_view(keys=[ord("x")])
+ view._queue.put({"kind": "done", "ok": 1, "total": 1})
+ view.run()
+ self.assertEqual(screen.timeouts[-1], -1)
+
def test_esc_cancels_and_confirms_stop_server(self):
confirm_answers = [True, True] # cancel? yes; stop server? yes
with patch.object(runview.tui, "confirm",