Skip to content

Commit

Permalink
Fix test to correctly test for methods
Browse files Browse the repository at this point in the history
  • Loading branch information
tkellogg committed Nov 25, 2024
1 parent 018c250 commit 0639561
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions tests/predict/test_react.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,11 +135,13 @@ def foo(a: int, b: int) -> int:

def test_tool_from_class():
class Foo:
def __init__(self, a: int, b: int):
self.a = a
self.b = b
def __init__(self, user_id: str):
self.user_id = user_id

def foo(self, a: int, b: int) -> int:
return a + b

tool = react.Tool(Foo)
assert tool.name == "Foo"
assert tool.name == "foo"
assert tool.desc == ""
assert tool.args == {"a": "int", "b": "int"}

0 comments on commit 0639561

Please sign in to comment.