File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed
Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change 1111from collections .abc import Generator
1212from typing import Any
1313
14+ try :
15+ from builtins import ExceptionGroup
16+ except ImportError :
17+ from exceptiongroup import ExceptionGroup
18+
1419import anyio
1520import httpx
1621import pytest
@@ -1620,8 +1625,8 @@ async def html_endpoint(request: Request):
16201625 port = s .getsockname ()[1 ]
16211626
16221627 # Use a thread instead of multiprocessing to avoid pickle issues
1623- import threading
16241628 import asyncio
1629+ import threading
16251630
16261631 def run_server ():
16271632 loop = asyncio .new_event_loop ()
@@ -1662,7 +1667,7 @@ def find_mcp_error(exc_group):
16621667
16631668 mcp_error = find_mcp_error (exc_info .value )
16641669
1665- assert mcp_error is not None , f "Expected McpError in ExceptionGroup hierarchy"
1670+ assert mcp_error is not None , "Expected McpError in ExceptionGroup hierarchy"
16661671 assert "Unexpected content type" in str (mcp_error )
16671672 assert "text/html" in str (mcp_error )
16681673
You can’t perform that action at this time.
0 commit comments