File tree Expand file tree Collapse file tree 2 files changed +2
-1
lines changed
tests/integrations/anthropic Expand file tree Collapse file tree 2 files changed +2
-1
lines changed Original file line number Diff line number Diff line change @@ -123,7 +123,7 @@ def setup_once() -> None:
123123
124124 # Before https://github.com/anthropics/anthropic-sdk-python/commit/b1a1c0354a9aca450a7d512fdbdeb59c0ead688a
125125 # MessageStream inherits from Stream, so patching Stream is sufficient on these versions.
126- if version >= (0 , 26 , 2 ):
126+ if version is not None and version >= (0 , 26 , 2 ):
127127 MessageStream .__iter__ = _wrap_message_stream_iter (MessageStream .__iter__ )
128128 MessageStream .__next__ = _wrap_message_stream_next (MessageStream .__next__ )
129129 MessageStream .close = _wrap_message_stream_close (MessageStream .close )
Original file line number Diff line number Diff line change @@ -821,6 +821,7 @@ def test_stream_messages_iterator_methods(
821821 next (stream )
822822 next (stream )
823823 list (islice (stream , 1 ))
824+ next (stream )
824825 # New versions add TextEvent, so consume one more event.
825826 if TextEvent is not None and isinstance (next (stream ), TextEvent ):
826827 next (stream )
You can’t perform that action at this time.
0 commit comments