Skip to content

Commit b19523e

Browse files
Linter fix
1 parent 290853e commit b19523e

File tree

6 files changed

+22
-13
lines changed

6 files changed

+22
-13
lines changed

tests/conftest.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
"""Pytest configuration and fixtures for tests."""
22

3-
from unittest.mock import Mock
43
from typing import Type
4+
from unittest.mock import Mock
55

6-
import httpx
76
import pytest
87
from openai import AsyncOpenAI
98

@@ -102,4 +101,3 @@ def test_execution_config():
102101
max_clarifications=3,
103102
max_searches=4,
104103
)
105-

tests/test_agent_factory.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
"""Tests for agent factory and configuration-based agent creation.
22
3-
This module contains tests for AgentFactory and dynamic agent instantiation.
3+
This module contains tests for AgentFactory and dynamic agent
4+
instantiation.
45
"""
56

67
from unittest.mock import Mock, patch
@@ -275,6 +276,7 @@ async def test_empty_task_creation(self):
275276
@pytest.mark.asyncio
276277
async def test_agent_creation_with_toolkit(self):
277278
"""Test creating agent with custom toolkit."""
279+
278280
class CustomTool(BaseTool):
279281
tool_name = "custom_tool"
280282
description = "A custom test tool"
@@ -402,6 +404,7 @@ async def test_create_agent_with_string_tool(self):
402404
@pytest.mark.asyncio
403405
async def test_create_agent_with_mixed_tools(self):
404406
"""Test creating agent with both class and string tool names."""
407+
405408
class CustomTool(BaseTool):
406409
tool_name = "custom_tool"
407410
description = "A custom test tool"
@@ -511,6 +514,7 @@ class TestAgentFactoryMCPIntegration:
511514
@pytest.mark.asyncio
512515
async def test_create_agent_with_mcp_tools(self):
513516
"""Test creating agent with MCP tools."""
517+
514518
class MockMCPTool(BaseTool):
515519
tool_name = "mcp_tool"
516520
description = "Mock MCP tool"
@@ -545,6 +549,7 @@ class MockMCPTool(BaseTool):
545549
@pytest.mark.asyncio
546550
async def test_create_agent_with_mcp_and_regular_tools(self):
547551
"""Test creating agent with both MCP and regular tools."""
552+
548553
class MockMCPTool1(BaseTool):
549554
tool_name = "mcp_tool_1"
550555
description = "Mock MCP tool 1"
@@ -613,4 +618,3 @@ def test_get_definitions_list_empty(self):
613618

614619
assert len(definitions) == 0
615620
assert definitions == []
616-

tests/test_api_endpoints.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ async def mock_execute():
133133
mock_agent_def = Mock()
134134
mock_factory.get_definitions_list.return_value = [mock_agent_def]
135135
mock_agent_def.name = "sgr_agent"
136-
136+
137137
# Make create method async
138138
mock_factory.create = AsyncMock(return_value=mock_agent)
139139

tests/test_base_agent.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,8 @@ def test_initialization_basic(self):
3636
assert agent.max_clarifications == 3
3737

3838
def test_initialization_with_custom_limits(self):
39-
"""Test initialization with custom iteration and clarification limits."""
39+
"""Test initialization with custom iteration and clarification
40+
limits."""
4041
from sgr_deep_research.core.agent_definition import ExecutionConfig
4142

4243
agent = create_test_agent(
@@ -72,6 +73,7 @@ def test_toolkit_initialization_default(self):
7273

7374
def test_toolkit_initialization_with_custom_tools(self):
7475
"""Test adding custom tools to toolkit."""
76+
7577
class CustomTool(BaseTool):
7678
pass
7779

@@ -139,7 +141,8 @@ async def test_provide_clarification_increments_counter(self):
139141

140142
@pytest.mark.asyncio
141143
async def test_provide_clarification_sets_event(self):
142-
"""Test that providing clarification sets the clarification_received event."""
144+
"""Test that providing clarification sets the clarification_received
145+
event."""
143146
agent = create_test_agent(BaseAgent, task="Test")
144147
agent._context.clarification_received.clear()
145148

tests/test_base_tool.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
"""Tests for BaseTool base class.
22
3-
This module contains tests for the BaseTool base class,
4-
covering initialization, subclassing, and tool_name generation.
3+
This module contains tests for the BaseTool base class, covering
4+
initialization, subclassing, and tool_name generation.
55
"""
66

77
from pydantic import BaseModel
@@ -31,20 +31,23 @@ def test_base_tool_default_description_is_none(self):
3131

3232
def test_subclass_auto_generates_tool_name(self):
3333
"""Test that subclass auto-generates tool_name from class name."""
34+
3435
class MyCustomTool(BaseTool):
3536
pass
3637

3738
assert MyCustomTool.tool_name == "mycustomtool"
3839

3940
def test_subclass_preserves_custom_tool_name(self):
4041
"""Test that subclass can override tool_name."""
42+
4143
class MyCustomTool(BaseTool):
4244
tool_name = "custom_name"
4345

4446
assert MyCustomTool.tool_name == "custom_name"
4547

4648
def test_subclass_can_have_description(self):
4749
"""Test that subclass can have description."""
50+
4851
class MyCustomTool(BaseTool):
4952
description = "Custom tool description"
5053

tests/test_prompts.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,8 @@ def test_load_prompt_file_io_error(self):
6666
assert "Permission denied" in str(exc_info.value)
6767

6868
def test_load_prompt_file_strips_whitespace(self):
69-
"""Test that loaded content is not automatically stripped (PromptsConfig
70-
doesn't strip, but we can test the raw loading)."""
69+
"""Test that loaded content is not automatically stripped
70+
(PromptsConfig doesn't strip, but we can test the raw loading)."""
7171
with tempfile.TemporaryDirectory() as tmpdir:
7272
test_file = os.path.join(tmpdir, "whitespace.txt")
7373
test_content = " \n Content with spaces \n "
@@ -280,7 +280,8 @@ def test_get_clarification_template_date_format(self):
280280
assert len(date_part) == 19 # YYYY-MM-DD HH:MM:SS
281281

282282
def test_load_prompt_file_falls_back_to_lib_dir(self):
283-
"""Test that PromptsConfig can load files from default library directory."""
283+
"""Test that PromptsConfig can load files from default library
284+
directory."""
284285
# This tests that PromptsConfig can load files using default paths
285286
# In real scenario, it should find files in the installed package
286287
try:

0 commit comments

Comments
 (0)