smolagents/tests/test_tool_validation.py

10 lines
415 B
Python

import pytest
from smolagents.default_tools import DuckDuckGoSearchTool, GoogleSearchTool, VisitWebpageTool
from smolagents.tool_validation import validate_tool_attributes
@pytest.mark.parametrize("tool_class", [DuckDuckGoSearchTool, GoogleSearchTool, VisitWebpageTool])
def test_validate_tool_attributes(tool_class):
assert validate_tool_attributes(tool_class) is None, f"failed for {tool_class.name} tool"