Skip to content

armgit / letta

Public Imported from GitHub
0

Platform for stateful agents: AI with advanced memory that can learn and self-improve over time.

feat: Fix tests/test_agent_serialization_v2.py sorting issues test (#3383)

Matthew Zhou181006b3ea61
diff --git a/tests/test_agent_serialization_v2.py b/tests/test_agent_serialization_v2.py
index d36098fd0..462f2fc2d 100644
--- a/tests/test_agent_serialization_v2.py
+++ b/tests/test_agent_serialization_v2.py
@@ -294,7 +294,7 @@ def _compare_agents(orig: AgentSchema, imp: AgentSchema, index: int) -> List[str
if orig.agent_type != imp.agent_type:
errors.append(f"Agent {index}: agent_type mismatch: '{orig.agent_type}' vs '{imp.agent_type}'")
- if orig.tags != imp.tags:
+ if sorted(orig.tags or []) != sorted(imp.tags or []):
errors.append(f"Agent {index}: tags mismatch: {orig.tags} vs {imp.tags}")
if orig.metadata != imp.metadata:
@@ -378,7 +378,7 @@ def _compare_tools(orig: ToolSchema, imp: ToolSchema, index: int) -> List[str]:
if orig.json_schema != imp.json_schema:
errors.append(f"Tool {index}: json_schema mismatch")
- if orig.tags != imp.tags:
+ if sorted(orig.tags or []) != sorted(imp.tags or []):
errors.append(f"Tool {index}: tags mismatch: {orig.tags} vs {imp.tags}")
if orig.metadata_ != imp.metadata_: