Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions tests/unittests/models/test_litellm.py
Original file line number Diff line number Diff line change
Expand Up @@ -10762,7 +10762,7 @@ def test_repaired_arguments_log_warning_without_raw_payload(self, caplog):

def test_repaired_arguments_log_debug_with_raw_payload(self, caplog):
"""Repaired non-strict JSON arguments emit warning with payload at debug level."""
with caplog.at_level(logging.DEBUG):
with caplog.at_level(logging.DEBUG, logger="google_adk"):
_parse_tool_call_arguments("{a: 1}", function_name="test_fn")
assert "test_fn" in caplog.text
assert "{a: 1}" in caplog.text
Expand All @@ -10780,7 +10780,7 @@ def test_repaired_arguments_without_function_name(self, caplog):
assert "{a: 1}" not in caplog.text

caplog.clear()
with caplog.at_level(logging.DEBUG):
with caplog.at_level(logging.DEBUG, logger="google_adk"):
_parse_tool_call_arguments("{a: 1}")
warning_records = [
r for r in caplog.records if r.levelno == logging.WARNING
Expand All @@ -10794,7 +10794,7 @@ def test_literal_eval_layer_logs_debug_not_warning(self, caplog):
_parse_tool_call_arguments("{'a': 1}", function_name="test_fn")
assert not any(r.levelno == logging.WARNING for r in caplog.records)

with caplog.at_level(logging.DEBUG):
with caplog.at_level(logging.DEBUG, logger="google_adk"):
_parse_tool_call_arguments("{'a': 1}", function_name="test_fn")
assert not any(r.levelno == logging.WARNING for r in caplog.records)
debug_records = [
Expand All @@ -10808,7 +10808,7 @@ def test_literal_eval_layer_logs_debug_not_warning(self, caplog):

def test_literal_eval_without_function_name_logs_debug(self, caplog):
"""Python dict literal without function_name logs at debug."""
with caplog.at_level(logging.DEBUG):
with caplog.at_level(logging.DEBUG, logger="google_adk"):
_parse_tool_call_arguments("{'a': 1}")
assert not any(r.levelno == logging.WARNING for r in caplog.records)
debug_records = [
Expand Down
Loading