Skip to content

Commit

Permalink
Minor updates to tests from upstream.
Browse files Browse the repository at this point in the history
  • Loading branch information
tjni committed Jan 6, 2025
1 parent e62cb41 commit 158df38
Show file tree
Hide file tree
Showing 8 changed files with 14 additions and 12 deletions.
3 changes: 1 addition & 2 deletions langgraph-tests/tests/test_interruption.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
from typing import TypedDict

import pytest
from pytest_mock import MockerFixture
from typing_extensions import TypedDict

from langgraph.graph import END, START, StateGraph
from tests.conftest import (
Expand Down
3 changes: 2 additions & 1 deletion langgraph-tests/tests/test_large_cases.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,14 @@
import time
from contextlib import contextmanager
from dataclasses import replace
from typing import Annotated, Any, Iterator, Literal, Optional, TypedDict, Union, cast
from typing import Annotated, Any, Iterator, Literal, Optional, Union, cast

import httpx
import pytest
from langchain_core.runnables import RunnableConfig, RunnableMap, RunnablePick
from pytest_mock import MockerFixture
from syrupy import SnapshotAssertion
from typing_extensions import TypedDict

from langgraph.channels.context import Context
from langgraph.channels.last_value import LastValue
Expand Down
2 changes: 1 addition & 1 deletion langgraph-tests/tests/test_large_cases_async.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
AsyncIterator,
Literal,
Optional,
TypedDict,
Union,
cast,
)
Expand All @@ -21,6 +20,7 @@
from pydantic import BaseModel
from pytest_mock import MockerFixture
from syrupy import SnapshotAssertion
from typing_extensions import TypedDict

from langgraph.channels.context import Context
from langgraph.channels.last_value import LastValue
Expand Down
3 changes: 3 additions & 0 deletions langgraph-tests/tests/test_prebuilt.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,9 @@ def bind_tools(
tools: Sequence[Union[Dict[str, Any], Type[BaseModel], Callable, BaseTool]],
**kwargs: Any,
) -> Runnable[LanguageModelInput, BaseMessage]:
if len(tools) == 0:
raise ValueError("Must provide at least one tool")

tool_dicts = []
for tool in tools:
if not isinstance(tool, BaseTool):
Expand Down
2 changes: 1 addition & 1 deletion langgraph-tests/tests/test_pregel.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
Iterator,
Literal,
Optional,
TypedDict,
Union,
)

Expand All @@ -22,6 +21,7 @@
)
from pytest_mock import MockerFixture
from syrupy import SnapshotAssertion
from typing_extensions import TypedDict

from langgraph.channels.binop import BinaryOperatorAggregate
from langgraph.channels.context import Context
Expand Down
3 changes: 1 addition & 2 deletions langgraph-tests/tests/test_pregel_async.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,7 @@
Dict,
Literal,
Optional,
TypedDict,
Union,
cast,
)

import httpx
Expand All @@ -27,6 +25,7 @@
from langchain_core.utils.aiter import aclosing
from pytest_mock import MockerFixture
from syrupy import SnapshotAssertion
from typing_extensions import TypedDict

from langgraph.channels.binop import BinaryOperatorAggregate
from langgraph.channels.context import Context
Expand Down
8 changes: 4 additions & 4 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ mypy = "^1.10.0"
pymysql = "^1.1.1"
aiomysql = "^0.2.0"
types-PyMySQL = "^1.1.0"
langgraph = "0.2.58"
langgraph = "0.2.61"
syrupy = "^4.0.2"
pytest-repeat = "^0.9.3"
pytest-xdist = {extras = ["psutil"], version = "^3.6.1"}
Expand Down

0 comments on commit 158df38

Please sign in to comment.