Test validate_tool_attributes (#696)

This commit is contained in:
Albert Villanova del Moral 2025-02-18 20:06:53 +01:00 committed by GitHub
parent 14d310b0dc
commit 1f998f98e0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 14 additions and 0 deletions

View File

@ -93,6 +93,11 @@ jobs:
uv run pytest ./tests/test_tools.py
if: ${{ success() || failure() }}
- name: Tool validation tests
run: |
uv run pytest ./tests/test_tool_validation.py
if: ${{ success() || failure() }}
- name: Types tests
run: |
uv run pytest ./tests/test_types.py

View File

@ -0,0 +1,9 @@
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"