From 7a2f300b2a838ec1700e23f2b98d83581c92be90 Mon Sep 17 00:00:00 2001 From: Aymeric Roucher <69208727+aymeric-roucher@users.noreply.github.com> Date: Tue, 28 Jan 2025 11:02:21 +0100 Subject: [PATCH] Add test for DDGS Tool kwargs (#387) --- tests/test_default_tools.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tests/test_default_tools.py b/tests/test_default_tools.py index 91c40c6..89b7e85 100644 --- a/tests/test_default_tools.py +++ b/tests/test_default_tools.py @@ -16,7 +16,7 @@ import unittest import pytest -from smolagents.default_tools import PythonInterpreterTool, VisitWebpageTool +from smolagents.default_tools import DuckDuckGoSearchTool, PythonInterpreterTool, VisitWebpageTool from smolagents.types import _AGENT_TYPE_MAPPING from .test_tools import ToolTesterMixin @@ -29,6 +29,10 @@ class DefaultToolTests(unittest.TestCase): assert isinstance(result, str) assert "* [About Wikipedia](/wiki/Wikipedia:About)" in result # Proper wikipedia pages have an About + def test_ddgs_with_kwargs(self): + result = DuckDuckGoSearchTool(timeout=20)("DeepSeek parent company") + assert isinstance(result, str) + class PythonInterpreterToolTester(unittest.TestCase, ToolTesterMixin): def setUp(self):