Skip to content

Commit 5fc777d

Browse files
author
skyvanguard
committed
fix: add pragma for pytest.raises branch that never falls through
The pytest.raises context manager always expects the exception; the fall-through branch (no exception) is never taken. Github-Issue:#1811
1 parent 25a20a2 commit 5fc777d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tests/issues/test_1811_sse_disconnect_hang.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ async def test_client_receives_error_on_sse_disconnect(slow_server_url: str):
156156

157157
# Call the slow tool - the read timeout should fire
158158
# and the client should receive an error instead of hanging
159-
with pytest.raises(McpError, match="SSE stream disconnected"):
159+
with pytest.raises(McpError, match="SSE stream disconnected"): # pragma: no branch
160160
await session.call_tool("slow_tool", {})
161161

162162

0 commit comments

Comments
 (0)