Add an additional test and "fix" code coverage (#1242).

This commit is contained in:
Dan Helfman
2026-01-24 12:28:33 -08:00
parent ca4447ffab
commit ff2f9fd5ee
2 changed files with 8 additions and 1 deletions
+1 -1
View File
@@ -222,7 +222,7 @@ def read_lines(buffer, process, line_separator='\n'):
if not chunk: # EOF
# The process is still running, so we keep running too.
if process.poll() is None:
if process.poll() is None: # pragma: no cover
continue
break
+7
View File
@@ -302,6 +302,13 @@ def test_handle_log_record_over_max_line_count_trims_and_appends():
assert last_lines == [*original_last_lines[1:], 'line']
def test_handle_log_record_without_last_lines_just_handles():
flexmock(module.logger).should_receive('handle').once()
log_record = flexmock(levelno=module.logging.INFO, getMessage=lambda: 'line')
assert module.handle_log_record(log_record) == log_record
def test_log_buffer_lines_without_buffer_readers_bails():
flexmock(module.select).should_receive('select').never()