if self._idx == 0:
self._play_till_log()
- def next_log(self) -> tuple[int, tuple[int, ...], str]:
+ def next_log(self) -> tuple[tuple[int, ...], str]:
'Return index, win IDs, and context of next expected log line.'
context, msg = self._split_by_context_separator(self._current_line[1])
if _CHAR_RANGE in context:
_, context = context.split(_CHAR_RANGE)
expected_win_ids = tuple(
int(idx) for idx in context.split(_CHAR_WIN_ID_SEP) if idx)
- used_idx = self._idx
self._idx += 1
self._play_till_log()
- return used_idx, expected_win_ids, msg
+ return expected_win_ids, msg
def _play_till_log(self) -> None:
while True:
for c in time_str[:2] + time_str[3:5] + time_str[6:]:
assert c.isdigit()
assert time_str[2] == ':' and time_str[5] == ':'
- idx, expected_win_ids, expected_msg = self._playbook.next_log()
- info = (idx,
- 'WANTED:', expected_win_ids, expected_msg,
+ expected_win_ids, expected_msg = self._playbook.next_log()
+ info = ('WANTED:', expected_win_ids, expected_msg,
'GOT:', win_ids, msg_sans_time)
assert expected_msg == msg_sans_time, info
assert expected_win_ids == win_ids, info