Skip to content

test(core): Add test coverage for tool_registry.py #1972

Description

@brilliantkid87

Summary

The framework/runner/tool_registry.py (13KB, 388 lines) has no dedicated test coverage. This module handles critical tool discovery and registration functionality.

Current State

  • tool_registry.py - 388 lines, NO TESTS
  • Contains ToolRegistry class and @tool decorator
  • Handles tool discovery from modules, MCP servers, and manual registration

Key Components to Test

ToolRegistry Class

  • register() - Register tool with executor
  • register_function() - Auto-generate Tool from function
  • discover_from_module() - Load tools from Python file
  • get_tools() - Return all registered tools
  • get_executor() - Get unified executor function
  • has_tool() - Check if tool exists
  • cleanup() - Clean up MCP connections

@tool Decorator

  • Basic decoration
  • Custom name/description

Acceptance Criteria

  • Tests in core/tests/test_tool_registry.py
  • All tests pass with pytest tests/test_tool_registry.py -v
  • Ruff linting passes

I'd like to work on this!

Metadata

Metadata

Labels

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions