From 0ea69d22a53b16160f6aadfe267eb3e118bc954c Mon Sep 17 00:00:00 2001 From: mateo Date: Sat, 31 Oct 2026 22:57:35 +0000 Subject: [PATCH] test(sdk): keep EOF assertion compatible with pytest lint Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> --- .../sdk/test_anthropic_json_tool_cut_stream_sync_sdk.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tests/integration/sdk/test_anthropic_json_tool_cut_stream_sync_sdk.py b/tests/integration/sdk/test_anthropic_json_tool_cut_stream_sync_sdk.py index 930b2334d63..d33304c9e9c 100644 --- a/tests/integration/sdk/test_anthropic_json_tool_cut_stream_sync_sdk.py +++ b/tests/integration/sdk/test_anthropic_json_tool_cut_stream_sync_sdk.py @@ -145,8 +145,7 @@ def test_sync_stream_cut_before_the_json_tool_block_closes_still_yields_the_whol fragments: Final[list[str]] = [] if cut: with pytest.raises(MidStreamFallbackError, match="Stream ended before a finish_reason was received"): - for chunk in response: - fragments.append(str(chunk.choices[0].delta.content or "")) + fragments.extend(str(chunk.choices[0].delta.content or "") for chunk in response) else: fragments.extend(str(chunk.choices[0].delta.content or "") for chunk in response) text: Final = "".join(fragments)