Skip to content

Commit

Permalink
Update tests
Browse files Browse the repository at this point in the history
  • Loading branch information
cpsievert committed Dec 11, 2024
1 parent 3388547 commit 1bcb0df
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions tests/test_content_tools.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
from typing import Union

import pytest

from chatlas import ChatOpenAI
from chatlas.types import ContentToolResult

Expand All @@ -16,8 +15,8 @@ def add(x: int, y: int) -> int:

chat.register_tool(add)

assert len(chat.tools) == 1
tool = chat.tools["add"]
assert len(chat._tools) == 1
tool = chat._tools["add"]
assert tool.name == "add"
assert tool.func == add
assert tool.schema["function"]["name"] == "add"
Expand Down Expand Up @@ -48,8 +47,8 @@ def foo(

chat.register_tool(foo)

assert len(chat.tools) == 1
tool = chat.tools["foo"]
assert len(chat._tools) == 1
tool = chat._tools["foo"]
assert tool.name == "foo"
assert tool.func == foo
assert tool.schema["function"]["name"] == "foo"
Expand Down

0 comments on commit 1bcb0df

Please sign in to comment.