Test validate_tool_attributes (#696)
This commit is contained in:
parent
14d310b0dc
commit
1f998f98e0
|
@ -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
|
||||
|
|
|
@ -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"
|
Loading…
Reference in New Issue