Skip to content

Commit

Permalink
Add another ut
Browse files Browse the repository at this point in the history
  • Loading branch information
hinthornw committed Apr 18, 2024
1 parent 0eda8ed commit d7ad870
Showing 1 changed file with 18 additions and 1 deletion.
19 changes: 18 additions & 1 deletion python/tests/unit_tests/test_testing.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
from langsmith._testing import _serde_example_values
from langsmith._testing import _serde_example_values, _get_id
import uuid


def test__serde_example_values():
Expand All @@ -10,3 +11,19 @@ def __init__(self, a, b):
results = _serde_example_values({"foo": Foo(1, 2)})
assert "foo" in results
assert isinstance(results["foo"], str)


def test__get_id():
class Foo:
bar: str = "baz"

def __init__(self, a: int, b: int):
self.a = a
self.b = b

def foo(x: Foo):
return x

suite_id = uuid.UUID("4e32bff6-5762-4906-8d74-ee2bd0f1d234")

_get_id(foo, {"x": Foo(1, 2)}, suite_id)

0 comments on commit d7ad870

Please sign in to comment.