1515)
1616
1717
18- def test_run_behavioral_tests_tool_schema_structure ():
18+ def test_run_behavioral_tests_tool_schema_structure () -> None :
1919 """Test that the tool schema has the correct structure."""
2020 schema = RUN_BEHAVIORAL_TESTS_TOOL_SCHEMA
2121
2222 assert schema ["type" ] == "function"
2323 assert "function" in schema
24- assert schema ["function" ]["name" ] == "run_behavioral_tests"
25- assert "description" in schema ["function" ]
26- assert "parameters" in schema ["function" ]
27-
28- params = schema ["function" ]["parameters" ]
24+ func = schema ["function" ]
25+ assert isinstance (func , dict )
26+ assert func ["name" ] == "run_behavioral_tests"
27+ assert "description" in func
28+ assert "parameters" in func
29+
30+ params = func ["parameters" ]
31+ assert isinstance (params , dict )
2932 assert params ["type" ] == "object"
3033 assert "test_files" in params ["properties" ]
3134 assert "project_root" in params ["properties" ]
@@ -34,7 +37,7 @@ def test_run_behavioral_tests_tool_schema_structure():
3437 assert "project_root" in params ["required" ]
3538
3639
37- def test_get_tool_schema ():
40+ def test_get_tool_schema () -> None :
3841 """Test getting tool schema by name."""
3942 schema = get_tool_schema ("run_behavioral_tests" )
4043 assert schema is not None
@@ -44,7 +47,7 @@ def test_get_tool_schema():
4447 assert get_tool_schema ("non_existent_tool" ) is None
4548
4649
47- def test_get_all_tool_schemas ():
50+ def test_get_all_tool_schemas () -> None :
4851 """Test getting all tool schemas."""
4952 schemas = get_all_tool_schemas ()
5053 assert isinstance (schemas , list )
@@ -55,7 +58,7 @@ def test_get_all_tool_schemas():
5558 assert "run_behavioral_tests" in names
5659
5760
58- def test_available_tools_registry ():
61+ def test_available_tools_registry () -> None :
5962 """Test that the AVAILABLE_TOOLS registry has correct structure."""
6063 assert "run_behavioral_tests" in AVAILABLE_TOOLS
6164
@@ -65,13 +68,13 @@ def test_available_tools_registry():
6568 assert callable (tool ["function" ])
6669
6770
68- def test_execute_tool_unknown_tool ():
71+ def test_execute_tool_unknown_tool () -> None :
6972 """Test that execute_tool raises ValueError for unknown tools."""
7073 with pytest .raises (ValueError , match = "Unknown tool" ):
7174 execute_tool ("non_existent_tool" )
7275
7376
74- def test_run_behavioral_tests_tool_pytest ():
77+ def test_run_behavioral_tests_tool_pytest () -> None :
7578 """Test running pytest tests through the LLM tool."""
7679 test_code = """
7780def add(a, b):
@@ -104,7 +107,7 @@ def test_add():
104107 assert isinstance (result ["results" ], list )
105108
106109
107- def test_run_behavioral_tests_tool_failing_test ():
110+ def test_run_behavioral_tests_tool_failing_test () -> None :
108111 """Test running a failing test through the LLM tool."""
109112 test_code = """
110113def test_failing():
@@ -128,7 +131,7 @@ def test_failing():
128131 assert result ["failed_tests" ] >= 1
129132
130133
131- def test_run_behavioral_tests_tool_via_execute ():
134+ def test_run_behavioral_tests_tool_via_execute () -> None :
132135 """Test running tests through the execute_tool interface."""
133136 test_code = """
134137def test_simple():
@@ -151,7 +154,7 @@ def test_simple():
151154 assert result ["error" ] is None
152155
153156
154- def test_run_behavioral_tests_tool_invalid_path ():
157+ def test_run_behavioral_tests_tool_invalid_path () -> None :
155158 """Test handling of invalid test file path."""
156159 # Use repo root for project_root
157160 repo_root = Path (__file__ ).resolve ().parent .parent
@@ -167,7 +170,7 @@ def test_run_behavioral_tests_tool_invalid_path():
167170 assert result ["total_tests" ] == 0
168171
169172
170- def test_run_behavioral_tests_tool_with_test_type ():
173+ def test_run_behavioral_tests_tool_with_test_type () -> None :
171174 """Test specifying test type."""
172175 test_code = """
173176def test_with_type():
0 commit comments