@@ -640,6 +640,7 @@ class TestRemoveTools:
640
640
641
641
def test_remove_existing_tool (self , caplog : pytest .LogCaptureFixture ):
642
642
"""Test removing an existing tool."""
643
+
643
644
def add (a : int , b : int ) -> int :
644
645
"""Add two numbers."""
645
646
return a + b
@@ -671,6 +672,7 @@ def test_remove_nonexistent_tool(self, caplog: pytest.LogCaptureFixture):
671
672
672
673
def test_remove_tool_from_multiple_tools (self ):
673
674
"""Test removing one tool when multiple tools exist."""
675
+
674
676
def add (a : int , b : int ) -> int :
675
677
"""Add two numbers."""
676
678
return a + b
@@ -706,6 +708,7 @@ def divide(a: int, b: int) -> float:
706
708
@pytest .mark .anyio
707
709
async def test_call_removed_tool_raises_error (self ):
708
710
"""Test that calling a removed tool raises ToolError."""
711
+
709
712
def greet (name : str ) -> str :
710
713
"""Greet someone."""
711
714
return f"Hello, { name } !"
@@ -726,6 +729,7 @@ def greet(name: str) -> str:
726
729
727
730
def test_remove_tool_case_sensitive (self , caplog : pytest .LogCaptureFixture ):
728
731
"""Test that tool removal is case-sensitive."""
732
+
729
733
def test_func () -> str :
730
734
"""Test function."""
731
735
return "test"
@@ -746,4 +750,4 @@ def test_func() -> str:
746
750
747
751
# Remove with correct case
748
752
manager .remove_tool ("test_func" )
749
- assert manager .get_tool ("test_func" ) is None
753
+ assert manager .get_tool ("test_func" ) is None
0 commit comments