@@ -13,7 +13,7 @@ class TestValidationOptions:
1313 """Test validation options for MCP client sessions."""
1414
1515 @pytest .mark .anyio
16- async def test_strict_validation_default (self ):
16+ async def test_strict_validation_default (self ) -> None :
1717 """Test that strict validation is enabled by default."""
1818 # Create a mock client session
1919 read_stream = MagicMock ()
@@ -45,7 +45,7 @@ async def test_strict_validation_default(self):
4545 assert "has an output schema but did not return structured content" in str (exc_info .value )
4646
4747 @pytest .mark .anyio
48- async def test_lenient_validation_missing_content (self , caplog ) :
48+ async def test_lenient_validation_missing_content (self , caplog : pytest . LogCaptureFixture ) -> None :
4949 """Test lenient validation when structured content is missing."""
5050 # Set logging level to capture warnings
5151 caplog .set_level (logging .WARNING )
@@ -86,7 +86,7 @@ async def test_lenient_validation_missing_content(self, caplog):
8686 assert result .structuredContent is None
8787
8888 @pytest .mark .anyio
89- async def test_lenient_validation_invalid_content (self , caplog ) :
89+ async def test_lenient_validation_invalid_content (self , caplog : pytest . LogCaptureFixture ) -> None :
9090 """Test lenient validation when structured content is invalid."""
9191 # Set logging level to capture warnings
9292 caplog .set_level (logging .WARNING )
@@ -128,7 +128,7 @@ async def test_lenient_validation_invalid_content(self, caplog):
128128 assert result .structuredContent == {"result" : "not_an_integer" }
129129
130130 @pytest .mark .anyio
131- async def test_strict_validation_with_valid_content (self ):
131+ async def test_strict_validation_with_valid_content (self ) -> None :
132132 """Test that valid structured content passes validation."""
133133 read_stream = MagicMock ()
134134 write_stream = MagicMock ()
@@ -157,7 +157,7 @@ async def test_strict_validation_with_valid_content(self):
157157 assert result .structuredContent == {"result" : 42 }
158158
159159 @pytest .mark .anyio
160- async def test_schema_errors_always_raised (self ):
160+ async def test_schema_errors_always_raised (self ) -> None :
161161 """Test that schema errors are always raised regardless of validation mode."""
162162 # Create client with lenient validation
163163
@@ -184,7 +184,7 @@ async def test_schema_errors_always_raised(self):
184184 assert "Invalid schema for tool test_tool" in str (exc_info .value )
185185
186186 @pytest .mark .anyio
187- async def test_error_results_not_validated (self ):
187+ async def test_error_results_not_validated (self ) -> None :
188188 """Test that error results are not validated."""
189189 read_stream = MagicMock ()
190190 write_stream = MagicMock ()
@@ -215,7 +215,7 @@ async def test_error_results_not_validated(self):
215215 # No exception should be raised
216216
217217 @pytest .mark .anyio
218- async def test_tool_without_output_schema (self ):
218+ async def test_tool_without_output_schema (self ) -> None :
219219 """Test that tools without output schema don't trigger validation."""
220220 read_stream = MagicMock ()
221221 write_stream = MagicMock ()
0 commit comments