From 375a149bc27ce8f1214b74428ddae23a1c723aff Mon Sep 17 00:00:00 2001 From: Christian Heller Date: Mon, 15 Sep 2025 23:49:43 +0200 Subject: [PATCH] Don't kill testing keyboard and server input simulation loops after timeout. --- ircplom/testing.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/ircplom/testing.py b/ircplom/testing.py index f57c59f..f72f731 100644 --- a/ircplom/testing.py +++ b/ircplom/testing.py @@ -46,7 +46,7 @@ class TestTerminal(QueueMixin, TerminalInterface): try: to_yield = self._q_keypresses.get(timeout=0.1) except QueueEmpty: - break + yield None yield TuiEvent.affector('handle_keyboard_event' ).kw(typed_in=to_yield) @@ -75,7 +75,7 @@ class _FakeIrcConnection(IrcConnection): try: msg = self._q_server_msgs.get(timeout=0.1) except QueueEmpty: - break + yield None yield self._make_recv_event(IrcMessage.from_raw(msg)) @@ -123,11 +123,9 @@ class TestingClientTui(ClientTui): while True: self._playbook_idx += 1 line = self._playbook[self._playbook_idx] - if not line.strip(): + if line[:1] == '#' or not line.strip(): continue context, msg = line.split(' ', maxsplit=1) - if context == '#': - continue if context == '>': for c in msg: self._q_keypresses.put(c) -- 2.30.2