From: Christian Heller Date: Fri, 24 Oct 2025 18:16:11 +0000 (+0200) Subject: In tests, automatically call quit steps once end of script reached. X-Git-Url: https://plomlompom.com/repos/%7B%7B%20web_path%20%7D%7D/static/%7B%7Bprefix%7D%7D/add_free?a=commitdiff_plain;h=33d1174cba485e0e0e382cacb1c91046f3818044;p=ircplom In tests, automatically call quit steps once end of script reached. --- diff --git a/src/ircplom/testing.py b/src/ircplom/testing.py index 62ff9aa..e6dc6cd 100644 --- a/src/ircplom/testing.py +++ b/src/ircplom/testing.py @@ -353,6 +353,8 @@ class _Playbook: def _play_till_test(self) -> None: while True: + if self._idx >= len(self._lines_t): + self._lines_t += [('', '> /quit'), ('', 'log 0 <..')] idx_info, line = self._current_line cmd_name, args = self._cmdname_and_args_from(line) if self._verbose: