Skip to content

Commit 3dcf66d

Browse files
committed
Fix formatting
1 parent c3b70b0 commit 3dcf66d

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

tests/shared/test_streamable_http.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1526,6 +1526,7 @@ def test_server_backwards_compatibility_no_protocol_version(basic_server, basic_
15261526
@pytest.mark.anyio
15271527
async def test_client_crash_handled(basic_server, basic_server_url):
15281528
"""Test that cases where the client crashes are handled gracefully."""
1529+
15291530
# Simulate bad client that crashes after init
15301531
async def bad_client():
15311532
"""Client that triggers ClosedResourceError"""
@@ -1537,15 +1538,15 @@ async def bad_client():
15371538
async with ClientSession(read_stream, write_stream) as session:
15381539
await session.initialize()
15391540
raise Exception("client crash")
1540-
1541+
15411542
# Run bad client a few times to trigger the crash
15421543
for _ in range(3):
15431544
try:
15441545
await bad_client()
15451546
except Exception:
15461547
pass
15471548
await anyio.sleep(0.1)
1548-
1549+
15491550
# Try a good client, it should still be able to connect and list tools
15501551
async with streamablehttp_client(f"{basic_server_url}/mcp") as (
15511552
read_stream,

0 commit comments

Comments
 (0)