home
·
contact
·
privacy
projects
/
ircplom
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
78870be
)
Fix some minor testing log output irregularities.
master
author
Christian Heller
<c.heller@plomlompom.de>
Mon, 8 Dec 2025 00:52:35 +0000
(
01:52
+0100)
committer
Christian Heller
<c.heller@plomlompom.de>
Mon, 8 Dec 2025 00:52:35 +0000
(
01:52
+0100)
src/ircplom/testing.py
patch
|
blob
|
history
diff --git
a/src/ircplom/testing.py
b/src/ircplom/testing.py
index e954b3634127bbabdf6051c1fc2eaa31efc6e329..e855a12eb17f6dce46cdb0d068562cc62a160148 100644
(file)
--- a/
src/ircplom/testing.py
+++ b/
src/ircplom/testing.py
@@
-335,7
+335,7
@@
class _Playbook:
if cmd_name == _MARK_INSERT:
new_lines_t += [('', f'# <{line_t[1]}>')]
new_lines_t += insert(line_t[0], args, fragments)
if cmd_name == _MARK_INSERT:
new_lines_t += [('', f'# <{line_t[1]}>')]
new_lines_t += insert(line_t[0], args, fragments)
- new_lines_t += [('', f'# </
$
{_MARK_INSERT}>')]
+ new_lines_t += [('', f'# </{_MARK_INSERT}>')]
replacement_happened = True
else:
new_lines_t += [line_t]
replacement_happened = True
else:
new_lines_t += [line_t]
@@
-439,9
+439,11
@@
class _Playbook:
if self._idx == next_idx_before: # f may call ._play_till_test, so
self._play_till_test() # only call if that didn't happen
except AssertionError as e:
if self._idx == next_idx_before: # f may call ._play_till_test, so
self._play_till_test() # only call if that didn't happen
except AssertionError as e:
- for line in self._print_on_fail:
- print(line)
- print(f'FAILED: {self._path}')
+ if self._print_on_fail:
+ for line in self._print_on_fail:
+ print(line)
+ self._print_on_fail.clear() # to not re-print if called nested
+ print(f'FAILED: {self._path}')
raise e
def _play_till_test(self) -> None:
raise e
def _play_till_test(self) -> None:
@@
-467,6
+469,7
@@
class _Playbook:
break
if cmd_name == _MARK_LOG:
break
break
if cmd_name == _MARK_LOG:
break
+ self._idx += 1
if cmd_name == _MARK_SCREENLINE:
assert self.assert_screen_line is not None
assert self.redraw_affected is not None
if cmd_name == _MARK_SCREENLINE:
assert self.assert_screen_line is not None
assert self.redraw_affected is not None
@@
-474,7
+477,6
@@
class _Playbook:
self.assert_screen_line(int(args[0]), int(args[1]), *args[2:])
elif cmd_name == _MARK_WAIT:
sleep(int(args[0]))
self.assert_screen_line(int(args[0]), int(args[1]), *args[2:])
elif cmd_name == _MARK_WAIT:
sleep(int(args[0]))
- self._idx += 1
class TestingClientTui(ClientTui):
class TestingClientTui(ClientTui):