Skip to content

Commit 1ce1c41

Browse files
committed
Removed comments that broke the line length constraint:
Signed-off-by: Adrian Garcia adrian.garcia@inceptionai.ai
1 parent 92a1e8b commit 1ce1c41

File tree

1 file changed

+4
-10
lines changed

1 file changed

+4
-10
lines changed

tests/test_logger.py

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -282,7 +282,6 @@ def test_request_logger_log_outputs():
282282

283283
mock_logger.info.assert_called_once()
284284
call_args = mock_logger.info.call_args.args
285-
# logger.info(format_string, request_id, stream_info, outputs, output_token_ids, finish_reason)
286285
assert "Generated response %s%s" in call_args[0]
287286
assert call_args[1] == "test-123"
288287
assert call_args[3] == "Hello, world!"
@@ -309,7 +308,6 @@ def test_request_logger_log_outputs_streaming_delta():
309308

310309
mock_logger.info.assert_called_once()
311310
call_args = mock_logger.info.call_args.args
312-
# logger.info(format_string, request_id, stream_info, outputs, output_token_ids, finish_reason)
313311
assert "Generated response %s%s" in call_args[0]
314312
assert call_args[1] == "test-456"
315313
assert call_args[2] == " (streaming delta)"
@@ -337,7 +335,6 @@ def test_request_logger_log_outputs_streaming_complete():
337335

338336
mock_logger.info.assert_called_once()
339337
call_args = mock_logger.info.call_args.args
340-
# logger.info(format_string, request_id, stream_info, outputs, output_token_ids, finish_reason)
341338
assert "Generated response %s%s" in call_args[0]
342339
assert call_args[1] == "test-789"
343340
assert call_args[2] == " (streaming complete)"
@@ -400,7 +397,6 @@ def test_request_logger_log_outputs_none_values():
400397

401398
mock_logger.info.assert_called_once()
402399
call_args = mock_logger.info.call_args.args
403-
# logger.info(format_string, request_id, stream_info, outputs, output_token_ids, finish_reason)
404400
assert "Generated response %s%s" in call_args[0]
405401
assert call_args[1] == "test-none"
406402
assert call_args[3] == "Test output"
@@ -427,7 +423,6 @@ def test_request_logger_log_outputs_empty_output():
427423

428424
mock_logger.info.assert_called_once()
429425
call_args = mock_logger.info.call_args.args
430-
# logger.info(format_string, request_id, stream_info, outputs, output_token_ids, finish_reason)
431426
assert "Generated response %s%s" in call_args[0]
432427
assert call_args[1] == "test-empty"
433428
assert call_args[3] == ""
@@ -469,17 +464,16 @@ def test_request_logger_log_outputs_integration():
469464
input_call = mock_logger.info.call_args_list[0][0]
470465
output_call = mock_logger.info.call_args_list[1][0]
471466

472-
# Check input call: logger.info(format_string, request_id, prompt, params, ...)
473467
assert "Received request %s" in input_call[0]
474468
assert input_call[1] == "test-integration"
475469

476-
# Check output call: logger.info(format_string, request_id, stream_info, outputs, ...)
477470
assert "Generated response %s%s" in output_call[0]
478471
assert output_call[1] == "test-integration"
479472

480473

481474
def test_streaming_complete_logs_full_text_content():
482-
"""Test that streaming complete logging includes full accumulated text, not just token count."""
475+
"""Test that streaming complete logging includes
476+
full accumulated text, not just token count."""
483477
mock_logger = MagicMock()
484478

485479
with patch("vllm.entrypoints.logger.logger", mock_logger):
@@ -502,8 +496,8 @@ def test_streaming_complete_logs_full_text_content():
502496
# Verify the logged output is the full text, not a token count format
503497
logged_output = call_args[3]
504498
assert logged_output == full_response
505-
assert "tokens>" not in logged_output # Ensure it's not the old token count format
506-
assert "streaming_complete" not in logged_output # Ensure it's not the fallback format
499+
assert "tokens>" not in logged_output
500+
assert "streaming_complete" not in logged_output
507501

508502
# Verify other parameters
509503
assert call_args[1] == "test-streaming-full-text"

0 commit comments

Comments
 (0)