Skip to content

Commit 1e22f2e

Browse files
committed
add test case for explicit None
1 parent 00c6433 commit 1e22f2e

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

ollama/_types.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,9 @@ def __contains__(self, key: str) -> bool:
4545
>>> msg['tool_calls'] = [Message.ToolCall(function=Message.ToolCall.Function(name='foo', arguments={}))]
4646
>>> 'tool_calls' in msg
4747
True
48+
>>> msg['tool_calls'] = None
49+
>>> 'tool_calls' in msg
50+
True
4851
>>> tool = Tool()
4952
>>> 'type' in tool
5053
True

0 commit comments

Comments
 (0)