chore: ran linter and formatter
This commit is contained in:
@@ -22,9 +22,9 @@ class TestToolSpecFormat:
|
||||
|
||||
for spec in specs:
|
||||
# OpenAI format requires these fields
|
||||
assert (
|
||||
spec["type"] == "function"
|
||||
), f"Tool type must be 'function', got {spec.get('type')}"
|
||||
assert spec["type"] == "function", (
|
||||
f"Tool type must be 'function', got {spec.get('type')}"
|
||||
)
|
||||
assert "function" in spec, "Tool spec missing 'function' key"
|
||||
|
||||
func = spec["function"]
|
||||
@@ -55,9 +55,9 @@ class TestToolSpecFormat:
|
||||
# Verify required vs optional
|
||||
assert "name" in tool.parameters["required"], "name should be required"
|
||||
assert "age" in tool.parameters["required"], "age should be required"
|
||||
assert (
|
||||
"active" not in tool.parameters["required"]
|
||||
), "active has default, should not be required"
|
||||
assert "active" not in tool.parameters["required"], (
|
||||
"active has default, should not be required"
|
||||
)
|
||||
|
||||
def test_all_registered_tools_are_callable(self):
|
||||
"""CRITICAL: Verify all registered tools are actually callable."""
|
||||
@@ -127,9 +127,9 @@ class TestToolSpecFormat:
|
||||
properties = params.get("properties", {})
|
||||
|
||||
for param_name, param_spec in properties.items():
|
||||
assert (
|
||||
"description" in param_spec
|
||||
), f"Parameter {param_name} in {spec['function']['name']} missing description"
|
||||
assert "description" in param_spec, (
|
||||
f"Parameter {param_name} in {spec['function']['name']} missing description"
|
||||
)
|
||||
|
||||
def test_required_parameters_are_marked_correctly(self):
|
||||
"""Verify required parameters are correctly identified."""
|
||||
|
||||
Reference in New Issue
Block a user